How to get over LNK1170 error?

  • Thread starter Thread starter Marko
  • Start date Start date
M

Marko

Hi,

Anyone knows how to compile a really (9000 files)
huge project using nmake?

Here is the output:
C:\TEMP\nm114.tmp : fatal error LNK1170: line in command file contains
131071 or
more characters
NMAKE : fatal error U1077: 'C:\XXX\link.exe' : return code '0x492'
Stop.


I'd appreciate any help :)
 
one possible solution is to split your project into different sub projects,
providing individual makefiles for each sub project, and then in your main
makefile you build each subproject using those new makefile.

after all subprojects have been built your main makefile then links together
all generated object files.

that might cause you to have the same problem, because the list of object
files will be very long.
in that case you might have to compile the subprojects into static or
dynamic libraries that can then be linked against you main program.

having different makefiles also makes it easier to rebuild smaller parts of
your program after you changed some source files.

kind regards,
Bruno.
 
Bruno said:
one possible solution is to split your project into different sub projects,
providing individual makefiles for each sub project, and then in your main
makefile you build each subproject using those new makefile.

Right, that would be the final solution (desperate one).
I've tried to make a workaround according to KB156190 by adding
:" "="^ to objects var, but no luck.

IMHO having a limit of 128K (or any other limit beyond OS) is
pretty stupid. According to KB156190 it was 16K before, so
it probably depends on the linker version.
I mean, I have 2G of RAM, linker uses 12M, and it can not link
because of memory limit. ROTFL :)


Thanks, anyhow :)
 
Back
Top