"Argument list too long" error due to huge number of -I<dir> parameters in gcc command line

Jonathan Wakely jwakely.gcc@gmail.com
Fri Jul 13 07:37:00 GMT 2012


On 13 July 2012 07:56, Vasily Lukichev wrote:
> Hello,
>
> It is possible to pass in the gcc command line include directories via  -I or -I-.
>
> I am faced with a problem that I have too many -I<dir> lines in the gcc command line. It leads to "Argument list too long" error.
>
> I am thinking that probably it is possible to put all -I<dir> options in a separate file and pass the file location to gcc. Is it possible at all?

Yes, see the @file option documented at the bottom of this page:
http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html



More information about the Gcc-help mailing list