This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
"Argument list too long" error due to huge n umber of -I<dir> parameters in gcc command l ine
- From: Vasily Lukichev <luckich at inbox dot ru>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 13 Jul 2012 10:56:59 +0400
- Subject: "Argument list too long" error due to huge n umber of -I<dir> parameters in gcc command l ine
- Reply-to: Vasily Lukichev <luckich at inbox dot ru>
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?
Unfortunately I did not find a solution how to implement it in gcc.
May be there is some other way how to pass a lot of -I<dir> options without having troubles with "Argument list too long error"?
I do not have root access on the host so, cannot "play" with ARG_MAX environment variable.
Code refactoring is not a solution at the moment.
Thanks in advance for your help,
Vasily Lukichev.