VS2003到VS2008的可执行大小导致问题 [英] Executable size from VS2003 to VS2008 causing an issue

查看:106
本文介绍了VS2003到VS2008的可执行大小导致问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



得到了一个C ++应用程序,其中包含几十万行代码,这些代码刚刚从VS2003转换为VS2008.

可执行文件的大小已从11.8MB跃升到17MB.它的大小已超过5MB!

我想要减小大小的原因是,可执行文件在内置于加密Shell中后得到了后期处理.在运行程序时,在执行任何操作之前,都会进行解密阶段.现在,这花费的时间要长得多,而且我们的应用程序开始花费的时间也太长.如果不是这一步,我将完全不在乎多余的5 MB以上.

该应用程序动态链接到CRT和MFC,因此我认为可能会有一些(新?)编译器开关我可以轻按一下以减小尺寸.

NB我还没有安装SP1.

有人知道吗?

谢谢,

Pete

Hi,

Got a C++ application with a few hundred thousand lines of code that's just been converted from VS2003 to VS2008.

The executable size has jumped from 11.8MB to 17MB. It's grown over 5MB in size!

The reason I want to get the size down is that the executable gets post processed after it's built in a shell of encryption. When running the program, before anything is executed, the decryption phase takes place. This is now taking far longer and our application is now taking too long to start. If it wasn't for this step, I wouldn't care at all about the extra 5+ MB.

The application links dynamically to CRT and MFC so I'm thinking there might be some (new?) compiler switches I can flick to get the size down.

N.B. I haven't got SP1 installed yet.

Anyone got any ideas?

Thanks,

Pete

推荐答案

您是否正在使用新的MFC功能包? (默认情况下,vs2008 sp1包括此功能.)

如果是这样,则会导致我们的应用变得更大.

您可以尝试调整优化选项以最小化尺寸和使用".链接时间代码生成(/ltcg)";看看是否有帮助.

谢谢
Are you utilising the new MFC feature pack? (vs2008 sp1 includes this by default).

If so that has caused our apps to get bigger.

You could try tuning the optimisation options to minimise size and "Use Link Time Code Generation (/ltcg)" to see if that helps any.

Thanks


这篇关于VS2003到VS2008的可执行大小导致问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆