tags:

views:

41

answers:

1

I've run into a bug on windows CMake/MinGW builds where the number of object files sent to the linker causes the arguments list to exceed the maximum 32k characters the windows API allows. This manifests itself as an amazingly unhelpful "Error running link command: The parameter is incorrect" error.

Has anyone run into this before and found a workaround that doesn't involve reorganising the project paths or spliting it into libraries (as both are a lot of extra work)?

For example I know ld.exe takes a @file parameter to pass arguments, but can mingw-make be told to use this when arguments get too long?

Does running under msys / sh.exe work around this this limit?

A: 

If I read this bug report correctly, it's a known problem and has been fixed. I'm not sure if the product version field refers to the version exhibiting the bug or the version fixing the bug.

Jack Kelly
This bug was fixed in CMake 2.8.2
RobertJMaynard
Ah, well that makes things easy then (I'm currently using 2.6).
SpliFF