How to avoid Max Command line size on Windows

Sisyphus sisyphus1@optusnet.com.au
Fri Nov 18 03:10:00 GMT 2005


----- Original Message ----- 
From: "Brian Dessent"
>
> > 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.
>

I believe it's a limitation on the number of characters that can be typed
into the command prompt, rather than a limitation on the size of the command
that can be executed.

I'm not really set up to test this out conclusively, but I've certainly used
the above method to run a command in the MSYS shell that was too big to run
in the cmd.exe shell. (I think that I've had `cat cmd.txt` work where the
command has been too big to fit into the MSYS shell prompt as a
copy'n'paste - but I'm not sure as I don't usually bother with a
copy'n'paste.)

Cheers,
Rob




More information about the Gcc-help mailing list