In addition to that, you will not be able to use the static MFC any more if
you are moving to CPPCLI.
In CPPCLI object files created with /clr, /clr:pure, or /clr:safe always
depend on the DLL version of the CRT: Only /MD and /MDd is allowed - /MT and
/MTd are explicitly disallowed. If you are using the DLL version of the CRT,
you must use the DLL version of MFC, too.
Static linking could give you on-file-copy deployment - that's why I liked
this option, too. But with runtime environments like .NET, this dream is
over anyway and since MFC is deployed in WinSxS at least most versioning
problems are solved.
Marcus
"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:eA**************@TK2MSFTNGP14.phx.gbl...
"Skandaja" <ma******@world2web.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com... I have created a classic MFC Dialog application ( statically linked
to MFC Library) which can run on any windows platform, without any
library dependencies.
Now, In this application I want to use .NET library say I want to use
sockets provided by .Net
using namespace System::Net::Sockets;
TcpClient* tl = new TcpClient("192.168.0.241",9001);
NetworkStream* nw = tl->GetStream();
bla.. bla...
I want to make a static link to the .Net libraries, so that my
application can run on any Windows platform, without any library
dependencies.
Is there any way I can acheive this??
That's not the way .Net was intended to be used and there is no support
from MS for doing that. There are a couple of third party products which
purport to be able to do that. This is one
http://www.remotesoft.com/linker/
about which by the way, I know nothing.
Frankly, your approach seems a high price to pay for socket support.
Regards,
Will