开发者

LNK1106 with big binary resource

I have a rather huge .dat-file (896MB) included as a BIN resource in my project. Now I get a LNK1106 link error ("fatal error LNK1106: invalid file or disk full: cannot seek to 0x382A3920".) I use Visual Studio 2005 under Windows XP, and have tried on a 4GB RAM machine with high Virtual Memory settings and lots of disk space. I have tried a number of different optimization flags, but to no avail.

Does anyone have a clue?

EDIT: I have narrowed it down to a specific size of the compiled resource. If the .res file is 544078588 bytes (about 518.9MB) or larger, the error occurs. I开发者_开发知识库f it is smaller it works just fine. Still no solution, though...


Under "Additional Linker Options", add /expectedoutputsize:600000000, and the link will work like a charm. You can't go too far with that switch though, or you'll end up with:

FATAL : link error LNK1102: out of memory


I fixed this by changing /OPT:IFC to /OPT:NOIFC. Can't tell you why it works. Your results may vary.


Is the dat file generated or has it changed recently? Your program may be trying to link against an incorrect version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜