Problem compiling ATL minDependency Visual .NET 2003
-
Hello, I have a problem compiling a project using the MinDependency option. It gives me all kind of linke errors like these
Linking... LIBCMT.lib(crt0dat.obj) : error LNK2005: __osplatform already defined in atlmincrt.lib(atlinit.obj) LIBCMT.lib(crt0dat.obj) : warning LNK4006: __osplatform already defined in atlmincrt.lib(atlinit.obj); second definition ignored Creating library .\ReleaseMinDependency/myproj.lib and object .\ReleaseMinDependency/myproj.exp LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup .\ReleaseMinDependency/myproj.dll : fatal error LNK1120: 1 unresolved externals
Now, if I understand it correctly, this is because _ATL_MIN_CRT is defined. I goto the project properties, set 'Minimize CRT usage in ATL' to No and 'Use of ATL' to Statically linked. When I cross check with C/C++ Preprocessor I see _ATL_MIN_CRT is gone from the Inherited Values in the 'Preprocessor Definitions' property. Now, when I compile and when the linkstep failed, I check the build.log and surprisingly I see the /D "_ATL_MIN_CRT" flag. Did I do something wrong? Do other options (/GX) flag automatically add it to the cl.exe parameters? Even when I check the C/C++ commandline in the project preoperties tab, it is not there. Any clue? Thanks Wim