链接错误C1128和LNK1210

本文介绍了解决Microsoft编译器中出现的FatalError C1128和Fatal error LNK1210的方法。C1128错误通常由于目标文件格式限制导致,可通过增加/BigObj选项解决。LNK1210错误则因链接器内部ILK文件大小限制引起,可通过增加内存或使用/3GB开关解决。

1. Fatal Error C1128:number of sections exceeded object file format limit : compile with /bigobj

解决办法:

http://msdn2.microsoft.com/en-us/library/8578y171.aspx

 

2. Fatal error LNK1210: exceeded internal ILK size limit:
There was not enough memory available for LINK to create the incremental status (.ilk) file.

 

别人的解释:

"1. The 64MB limit is there to keep the ILK file from consuming too much of
the memory necessary to perform the link in the first place. It needs to be
reserved up front and doesn't move throughout the link. It holds the
in-memory data for linking which includes other pointers. The fact is,
linking is quite expensive in terms of memory and the larger a project is,
the larger the requirements, in general. We have to balance both the ILK
size and the size remaining we have to work with.


2. I am surprised VC6.0's linker has a different limit. I am certain it has
the same or lower, but that is beside the point now. It may have slipped out
without one and we fixed it. I do know that the intent of 7.0 was to use a
96MB limit, but due to a bug, that limit was not reached.


3. The limit is 256MB on machines running with the /3GB switch. Windows XP
allows /3GB on all SKUs now so that is one option. For the next release we
are raising the limit to 128MB on vanilla NT. It is about at that point that
we start infringing on the memory requirements of the image itself along
with all of the file I/O we have to do to perform the link.


ILK size is roughly equivalent to the image size, so they are a very large
image for x86. The largest image we have been able to link on an x86 machine
is roughly 350MB (an ia64 image). The memory requirements for doing this are
above 1GB of VM. In fact, anything over about 60MB of image size really
benefits from the /3GB switch or running on Win64."

 

解决办法:

移除/Zm选项

Error LNK2005: _DllMain@12 already defined in msvcrtd.lib(dllmain.obj)
mfcs90ud.lib
解决办法:
重定义连接顺序mfcs90ud.lib msvcrtd.lib

转载于:https://www.cnblogs.com/wuwuwu/archive/2008/08/30/6335184.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值