Why would release static lib be significantly larger then my debug build?




I have a VS2005 static library project of unmanaged C++ code. When I compile and link, I noticed that my debug lib is 2668K and the release build is over 16K. Why would release static lib be significantly larger than my debug build? Release is using /MD and Debug /MDD for runtime libraries. Debug information is disabled in release, NDEBUG is defined, optimization is set to speed, browse information is set to none.

Here is the compile command line options:
/O2 /GL /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "GARXFACE4_STATIC" /FD /EHsc /MD /Yu"stdafx.h" /Fp"Static Release\GarXface4.pch" /Fo"Static Release\2005\\" /Fd"Static Release\vc80.pdb" /W3 /nologo /c /Wp64 /TP /errorReport:prompt

And the linker command line:
/OUT:"lib/2005/GarXface4.lib" /NOLOGO /LTCG



I have the same project in VS2003 and the release build is about half the size of the debug build.

What should I be looking for that makes my VS2005 release so large?




--
Bruce E. Stemplewski
GarXface OCX and C++ Class Library for the Garmin GPS
www.stempsoft.com
.



Relevant Pages

  • Re: Debug/release libs
    ... I compiled it with Multithreaded DLL runtime in release mode. ... But users who use it should be able to debug ... their programs (i.e. compile their programs in debug mode Multithreaded ... In that case you need to supply 2 libraries to save your users form having ...
    (microsoft.public.dotnet.languages.vc)
  • Re: WM_TIMER crash (maybe)?
    ... addition, I suspect that, given the debug dialog IS, in fact, a dialog, and therefore it ... For example, if you install VC, it typically installs the ... that you could be replacing older DLLs with the latest redistributable DLLs. ... the rest were system DLLs, including OLE/COM libraries ...
    (microsoft.public.vc.mfc)
  • Re: NTDLL exception
    ... Compiling with the multithreaded release library in a debug version ... different libraries, which can produce linker conflicts of various sorts, and should you ... I am prone to migraines; I've had them, officially, since I was 12, and probably for years ...
    (microsoft.public.vc.mfc)
  • Re: NTDLL exception
    ... compile all static libraries and all applications, ... in debug and release, as "Multithreaded Release". ... stack checks that the "Debug" libraries give you, ... but most nontrivial applications end up using threads ...
    (microsoft.public.vc.mfc)
  • Re: unresolved external symbol in VS8 from VS6
    ... in Visual Studio .NET, it is likely that another library is being pulled ... This will output all of the libraries that are being ... Debug version works while release version doesn´t link. ... pruebaMFC.obj: error LNK2001: unresolved external symbol ...
    (microsoft.public.vc.mfc)