如何让我的非常大的程序链接? [英] How can I get my very large program to link?

查看:126
本文介绍了如何让我的非常大的程序链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的下一个产品已经变得太大,无法在运行32位Windows的机器上链接。所有lib文件的总和超过2Gb,并且只能在64位Windows机器上链接。最终,我们将超过这个边界,因为我们的软件往往是增长而不是合同,我们使用一个32位链接器(MS Visual Studio 2005):当我们的库大小超过3Gb时,我们预期会遇到麻烦。

Our next product has grown too large to link on a machine running 32-bit Windows. The sum total of all the lib files exceeds 2Gb and can only be linked on a 64-bit Windows machine. Eventually we will exceed that boundary, since our software tends to grow rather than contract and we are using a 32-bit linker (MS Visual Studio 2005): we expect to hit trouble when our lib size total exceeds 3Gb.

如何减少.lib文件或.obj文件的大小,而无需修剪代码?例如,我们使用了很多模板:有没有办法减少它们的占用?有没有什么办法找出导致膨胀从检查.lib / .obj文件是什么?这可以自动化,而不是眼睛检查? 2.5Gb是很多文本对等通过和比较。

How can I reduce the size of the .lib files, or the .obj files without trimming code? For example, we use a lot of templates: is there any way of reducing their footprint? Is there any way of finding out what's causing the bloat from examining the .lib/.obj files? Can this be automated rather than inspected by eye? 2.5Gb is a lot of text to peer through and compare.

外部约束阻止我们作为任何东西,除了一个.exe,所以DLL解决方案不可用

External constraints prevent us from shipping as anything other than a single .exe, so a DLL solution is not available.

推荐答案

尝试使用符号排序程序,以显示你的代码中膨胀的主要位置。另外,只要查看原始.obj文件的大小,就可以合理地知道要定位到哪里。

Try using the Symbol Sort program to show you where the main bits of bloat are in your code. Also just looking at the size of the raw .obj files will give you a reasonable idea of where to target.

这篇关于如何让我的非常大的程序链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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