LNK1106 with a large binary resource

I have a rather large .dat file (896MB) included as a BIN resource in my project. Now I get the error message LNK1106 ("fatal error LNK1106: invalid file or disk: cannot find 0x382A3920".) I use Visual Studio 2005 under Windows XP and tried on 4 GB of RAM with high virtual memory settings and lots of disk space . I tried several different optimization flags, but to no avail.

Does anyone have a clue?

EDIT: I narrowed it down to a certain size of the compiled resource. If the .res file is 544078588 bytes (about 518.9 MB) or more, an error occurs. If it is smaller, it works fine. There is no solution yet, though ...

+4
source share
3 answers

In the "Advanced linker options" section, add /expectedoutputsize:600000000 , and the link will work like a charm. You cannot go too far with this switch, or you end up with:

FATAL: communication error LNK1102: from memory

+3
source

I fixed this by changing / OPT: IFC to / OPT: NOIFC. I can’t say why this works. Your results may vary.

+1
source

Is a data file created or has it changed recently? Your program may try to communicate with the wrong version.

0
source

All Articles