MSVC 2005 Program Size & Conversions

Started by
1 comment, last by DrEvil 18 years ago
Just wanted to share something I finally found today. I'm sure many people probably know about it already, but the few times I mentioned it in several forum threads there was never anyone who offered the solution. When I switched to 2005, I noticed that my dlls that were being built by it were about 20% larger than the dlls that were built with 2003. I went through the options a couple times, but apparently overlooked the problem. When you upgrade a project/solution from 2003 to 2005. RTTI gets enabled, even if you had RTTI disabled in the 2003 project. RTTI as we all know builds type information in with the binary, significantly increasing the size of it. Whether this is a bug in the MS conversion program or they are just ignoring it during the conversion I don't know. 2005 apparently defaults to RTTI enabled in general, so this doesn't just apply to converted projects. Keep this in mind if you don't use RTTI. Also note for those that may not be aware. 2005 no longer has the option to select single threaded code generation, so part of the upgrading of existing projects is an automatic switch to multi-threaded code generation settings. This means you will need to compile any external libraries you link to using the same multi-threaded settings. They claim they have made the multi-threaded libraries just about as fast as the previous single threaded libs, so performance shouldn't be an issue. I guess with the world moving to multi-core and such they figured they would just drop it. So after disabling RTTI again, my dll lost about 64K. Not quite as much as it gained from 2003, but I reckon the multi-threaded code gen probably accounts for the rest of it. If anyone knows of any other things that could cause these sort of issues please share. Hopefully this helps others who may be wondering about size increase or sudden inability to link with libraries.
Advertisement
That's interesting, where do you switch off RTTI and the like? I know it's in settings, but spefically, where? Under linker settings?
c/c++, language settings, enable run-time type info

This topic is closed to new replies.

Advertisement