Flashman wrote:
Thanks for your answer Daniel! A couple of other questions on this if
someone can answer. What would be the settings for .NET 2003 to match
Visual C++ 6.00 optimizing? I find the executable from .NET 2003 alot
larger then what was produced under 6.00?
The settings are basically equivalent between the two, but there's no
combination of settings that will cause VC7.1 to produce exactly the same
code as VC6.
Some ideas in regard to executable size:
1. Make sure you're looking at a release build, not a debug build. VC7+
debug builds are quite a lot larger due to additional debug code.
2. Make sure you're not compiling with /RTC or /GS. Those options increase
code size, and VC6 had no equivalent options.
3. Use a linker map to determine the actual code size of the modules YOU
wrote. Many library modules are larger in VC7+ due to additional robustness
features, conformance improvements, etc.
4. Use dumpbin to determine the size of the code in your executable instead
of the size of the executable itself. There may be additional initialize
data (etc) in the VC7+ executable.
5. Make sure you're comparing native builds - i.e. that you're not compiling
with /clr in VC7.1. Otherwise you're comparing two different machine
architectures.
When you account for the other things that affect executable size, you'll
generally find that VC7.1 produces smaller/faster code than VC6.
-cd