Sign in to follow this  
DrEvil

MSVC 2005 Program Size & Conversions

Recommended Posts

DrEvil    1148
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.

Share this post


Link to post
Share on other sites
blanky    364
That's interesting, where do you switch off RTTI and the like? I know it's in settings, but spefically, where? Under linker settings?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this