How to avoid Max Command line size on Windows

Brian Dessent brian@dessent.net
Fri Nov 18 04:17:00 GMT 2005


Sisyphus wrote:

> I thought different. To me a "command line" is something that's entered at a
> prompt, and whilst makefiles contain commands, I've never thought of them as
> containing "command lines". But thinking about the numbers involved (ie
> 8192), I'm starting to think that your interpretation might be more to the
> point than mine :-)

The CreateProcess() limitation is actually 32k characters, so I'm not
sure exactly where this 8192 limit is coming from.  I have read in the
past where linking particularly large libraries (like libgcj) runs into
this 32k limit, and the workaround is cygexec (or
--enable-libgcj-multifile).  It seems like something else is imposing
this 8k limit - and since the poster did not mention the details of his
environment (cygwin, MSYS/mingw, etc) we probably won't know for sure. 
It might be that some autoconf test somewhere just uses 8k if it detects
it's running under mingw, or something.

Brian



More information about the Gcc-help mailing list