Friday, March 07, 2008

When mixing managed code with native C++ code ...

In the code generation section: there are few different options for the output runtime. The only supported CRT model with /CLR is /MD, i.e. multi-threaded DLL. There is a mixed code in my project since some are managed and some are native C++. In the earlier version of Visual Studio .Net IDE, I think there is an option that allows users to set “use the managed code”. But in VS2005, the option is gone. So, we need to be careful that if we want to use mixed code we will need to use both /MD and /clr. My command line options are:

/O2 /D "WIN32" /D "NDEBUG" /D "_VC80_UPGRADE=0x0710" /D
"_MBCS" /FD /EHa /MD /Fo"Release\\" /Fd"Release\vc80.pdb"
/W3 /nologo /c /Zi /clr:oldSyntax /TP /errorReport:prompt


Microsoft MSDN page for /CLR restrictions:

http://msdn2.microsoft.com/en-us/library/2kzt1wy3.aspx

0 Comments:

Post a Comment

<< Home