Re: Output dll bigger with VS 2005



1. Check the command line switches that are used with eVC4 and VS2005 (as
there are some differences in defaults, in particular -GR and -EHsc, that
may explain some of the differences)

2. I'm not sure what you mean by "release ... without any optimization
enabled" ? Release builds in VS do have optimizations enabled.

--
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:1D0ADBA4-0B74-4A02-AF92-2DB22418B0A4@xxxxxxxxxxxxxxxx
Hi!

We recently converted our projects to Visual Studio 2005 and realized that
the size of generated dlls in debug is a lot bigger than with eVC. When
debug
dlls are compiled with VS 2005 they use too much space in memory and we
don't
have enough memory to start the application (due to the 32MB limitation
per
process ). This is a major problem because we have to enable the
optimization
to decrease dlls size which makes the debugging a lot more complicated.

I noticed two things:

1. A non-mfc dll compiled with the preprocessor defenition _DEBUG and
using
the multi-threaded debug (/MTd) runtime library takes ~1 100KB more than
one
using the multi-threaded (/MT) runtime library. The libraries statically
linked with the runtime library options are libcmt.lib and libcmtd.lib
which
only have 200KB of difference in size. So why my dll with /MTd gets so
big?

2. We have a big debug mfc dll that takes 2 440KB with the Minimize Size
optimization enabled and 11 231KB without optimization. In release it
takes 2
777KB without any optimization enabled. One again do you know where the
size
difference comes from?

Any clue would be appriciated...

Thank you.
JF Morin


.



Relevant Pages

  • Re: debugging in release mode
    ... I have no doubt that it's a problem of mine and not of the compiler. ... I don't really need optimization ... for the sake of memory space or execution speed. ... shows the differences between the default debug mode and the default release ...
    (microsoft.public.vc.mfc)
  • Re: Mobile 5 - Debugging Managed C#/Unmanaged C++ Code
    ... Although the code was compiled in debug mode, ... optimization, but when I looked at the project again, it was set. ... like optimized code to me - you're sure you're running in Debug not Release ... as planned the compiler will strip it out in a Release build too, ...
    (microsoft.public.windowsce.app.development)
  • Re: Virtual ListView "invisible" with VC7.1 C++ optimization
    ... Debug version, I get the same problem (doesn't manifest with just ... no runtime error gets triggered. ... if I turn on any compiler optimization switches (/Og and/or /O1 ...
    (microsoft.public.win32.programmer.ui)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... what experienced programmers do, ... optimization, ... Thugs" ad nauseum fits that a lot more closely than discussing compiler ... be modified outside a loop, and guessing ...
    (comp.programming)
  • long(!) Re: need help on CFLAGS in /etc/make.conf please
    ... For example, MPlayer sets this high on purpose, so GCC will actually ... and the K&R compiler would've known exactly the kind of optimization we wanted. ... >> A msg from Richard Coleman, taken together with the GCC 3.x Known Bugs ...
    (freebsd-questions)