Wht's wrong with my compilier
-
:confused: I was writing a static library these days.I was using Virual C++ 8.0. I created a solution and added a new static library project to it,and coding,everything is fine.But that library that VC output seems just weird. output file (that library) in release mode is much bigger than debug mode. I am sure this is not about inline function or other VC settings.I tried discuss with fellows .But they don't know what's going on either.So please somebody help me,did I make any mistake? :( :( :( the following are my VC settins C/C++ settings in release mode /O2 /GL /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"E:\my_project\neo\\neo\tmp\mts_rls_lib\\" /Fd"E:\my_project\neo\\neo\tmp\mts_rls_lib\vc80.pdb" /W3 /nologo /c /Wp64 /TP /errorReport:prompt Administator settings in release mode /OUT:"E:\my_project\neo\\neo\lib\neo_mts_rls.lib" /NOLOGO /LTCG C/C++ settings in debug mode /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /Fo"E:\my_project\neo\\neo\tmp\mts_dbg_lib\\" /Fd"E:\my_project\neo\\neo\tmp\mts_dbg_lib\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt Administrator settings in release mode /OUT:"E:\my_project\neo\\neo\lib\neo_mts_dbg.lib" /NOLOGO
-
:confused: I was writing a static library these days.I was using Virual C++ 8.0. I created a solution and added a new static library project to it,and coding,everything is fine.But that library that VC output seems just weird. output file (that library) in release mode is much bigger than debug mode. I am sure this is not about inline function or other VC settings.I tried discuss with fellows .But they don't know what's going on either.So please somebody help me,did I make any mistake? :( :( :( the following are my VC settins C/C++ settings in release mode /O2 /GL /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MT /Fo"E:\my_project\neo\\neo\tmp\mts_rls_lib\\" /Fd"E:\my_project\neo\\neo\tmp\mts_rls_lib\vc80.pdb" /W3 /nologo /c /Wp64 /TP /errorReport:prompt Administator settings in release mode /OUT:"E:\my_project\neo\\neo\lib\neo_mts_rls.lib" /NOLOGO /LTCG C/C++ settings in debug mode /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /Fo"E:\my_project\neo\\neo\tmp\mts_dbg_lib\\" /Fd"E:\my_project\neo\\neo\tmp\mts_dbg_lib\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt Administrator settings in release mode /OUT:"E:\my_project\neo\\neo\lib\neo_mts_dbg.lib" /NOLOGO
Just stumbled across this. Way too late to help the OP, I'm sure, since this was posted two years ago. But in case anyone else with a similar question comes across it, the answer was that the OP has his or her Release mode set for whole program optimization (/GL). Using whole program optimization can be OK for an exe, but for numerous reasons (researchable on MSDN), it's rarely a good idea for a .lib