After asking this question in the VC++ Express forum and not receiving a single answer I gather this forum section might be a better place to search for answers.
I have a C++/CLI
solution I created in VS2005 Express consisting of a windows forms
project (the main programm) and a few libraries - now I'd like to
create a single executable instead of an executable and a bunch of dll
files. As I can't create static C++/CLI libraries (or can I ) how else
can I compile them into a single executable Simply moving the header and cpp files from one project to the other didn't do me any good.
Any ideas what I should look for when trying to combine different projects into one Or IS there a way to create a statically bind a managed code library to a programm I'd rather keep the library code seperate from the main application as I use parts of it in other projects, too.
The reason I want to do this is that this is just a small too that the user should be able to put wherever he wants, without having to be carefull about copying any additional files.

'static binding' with C++/CLI?
Vadim Tryshev - Microsoft
Hi!
Any progress on this issue I have the same problem when trying to link with a lib containing managed code (unmanaged classes works fine). I guess it is because the lib is not a MSIL-file
See also:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=463461&SiteID=1&mode=1
and:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=316940&SiteID=1
Kind regards
Dag
Radenko Zec
I'm quite new to VC++, having only a little experience with GCC (but that's also been a long time ago - I'm more familar with VC# 2003). Maybe I looked for the wrong keywords, but the VC++ 2005 Express help didn't turn up anything usefull, and I'm still waiting for my standard edition to arrive.
So could you give me some more detailed help, please In laymans terms, if possible... ;)
Ben Jackson33513
kdalons
kevintw
Includeing the library needs 2 things:
1. include the header file with the definitions in your cpp file.
2. define the LIB file in the input section of the linker. "#using" is not possible!
Raymond de Bourbon
:(
Lars E.Nes
You can create static C++/CLI libraries!!! (wow! I'm as surprised as you are).
Project Properties -> General -> Configuration Type -> Change to Static Library.
However, make sure all your libraries compile with the same set of switches (/clr:[pure|safe|oldSyntax] needs to be the same, as does /M[T|D|d|]).
Ravikumar KPV
It's most likely some very simple problem with the (obviously wrong) way I try to inlude the library. I just can't find any examples on how to do it correctly, so I could compare it to my desperate efforts... :(