Re: Output dll bigger with VS 2005



If you have a trivial application that compiled as debug (or with any
combination of compiler/linker options), using only libraries that ship with
Vs2005, can't be executed and debugged then it's a bug. I'll need a repro to
follow up with the team that owns the libraries.

To answer your question regarding the CRT size, when you use /MD or /MDd you
should link with msvcrt(d).lib (unless you have _STATIC_CPPLIB defined, as
documented in MSDN). These libraries are less than 50Kb on x86 (vs2005) so
even though you'd get some code linked statically even when you use the DLL
CRT I don't see how it would explain the large differences you see.

My suggestion is to use the /verbose and /map linker options to find out
what exactly goes into your final binary, this should show you where the
size difference comes from. If you need more assistance or find something
you believe to be a bug in the toolchain let me know.

--
Thank you,
Leonard Mosescu, Microsoft Windows CE Compiler Team

This posting is provided "AS IS" with no warranties, and confers no rights.

"Jeff Morin" <JeffMorin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:529AFC5B-D65E-4CBD-87F4-95087A4DAF56@xxxxxxxxxxxxxxxx
In the last hours I've been reading about C runtime libraries and testing
different projects and came to the deduction that the difference is in the
runtime library.

I did not found documentation that realy helped me out but I manually
modified a project configuration to make it build with the debug runtime
library (/MDd) and then with the release runtime library (/MD) and seen
that
this is what makes the difference. The same project output will take a lot
more space when using the debug runtime.

Why does it takes so much space if I'm using the dynamically linked
multi-threaded dll? I would have understood with /MT that statically link
to
the library but not with a dll.

By the way why can't we use /MD witout using the MFC shared dll? What is
the
link between the C runtime and the MFC?


.



Relevant Pages

  • Re: C run-time library
    ... >Debug Single-Threaded ... >Debug Multithreaded DLL ... to provide a comprehensive selection of libraries, ...
    (microsoft.public.vc.language)
  • 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: /MT and /MD
    ... and MSVCRT (MS Visual C++ Run Time DLL). ... between apps - makes your apps smaller!)... ... To link libs with debug info just add another 'd' at the end of the ... Any other libraries are your ...
    (microsoft.public.vc.language)
  • 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)

Loading