How to avoid Max Command line size on Windows
Fri Nov 18 00:08:00 GMT 2005
David Lamy-Charrier wrote:
> I am using GCC on Windows XP Professionnal which has a limit on
> command line size at 8192 Bytes.
> Unfortunately, with a lot of include paths and defines on the compile
> line and a lot of object files paths on the linker line, I reached
> this 8 KB limit very easily.
> So, I am wondering if there is a way to pass all arguments to GCC in a file ??
> (I know that Microsoft cl.exe support this feature)
If you are using Cygwin, then mount the binary cygexec. This bypasses
the windows limitations and allows virtually unlimited command lengths.
There is support in the mainline gcc and binutils for using '@file' to
specify arguments, just as with the Microsoft C compilers. But you'll
probably have to build it yourself from CVS.
> I get around this by putting the entire command in a file (cmd.txt), then
> running (in an MSYS shell):
> `cat cmd.txt`
I don't see how that changes anything. The shell just reads the command
from the file and then constructs the arguments from that. It does
nothing to shorten the actual gcc command that must be executed.
More information about the Gcc-help