I need to compile a DLL in Managed C++ in Visual Studio 2005.
I want it with 32Bit corflag on. See http://illuminatedcomputing.com/blog/?p=117 for reference.
By default, I choose Win32 platform and set the /MACHINE:X86 option in the liker, but the DLL generated has the 32bit corflag off. You can see it by executing from command line
corflags MyDll.dll
I have problems when running that dll in a Windows 64 bit. So I need to force the dll to 32 bit.
Any idea on how to c开发者_如何学Configure the Visual Studio 2005 compiler?
You can actually use CorFlags.exe to set this. In the command line:
corflags MyDll.dll /32BIT+
This will set the 32 bit flag for MyDll.dll
.
For more information see the corflags tag wiki.
精彩评论