This is the mail archive of the
mailing list for the GCC project.
Re: gcc default include path
- From: "Andi Hellmund" <mail at andihellmund dot com>
- To: "debugger_gcc" <ashay dot raut at tcs dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 30 Mar 2010 00:03:06 +0200
- Subject: Re: gcc default include path
- References: <email@example.com>
- Reply-to: mail at andihellmund dot com
> On linux:
>>From where does gcc picks up header files like stdio.h by default?
> Does it configure gcc to pick header files from particular location at the
> time of build?
There are default search directories statically configured at build time
(of gcc) and user-specified search directories specified at run-time.
To check the default search directories, you could run
# echo "" | gcc - -xc -v -E
#include <...> search starts here:
User-specified search directories are defined by the -I<dir> option
> On windows:
> I copied cygwin directory from one of my friend's machine where cygwin was
> installed to my machine.
> however when i run gcc from windows command prompt i get an error
> "stdio.h : no such file or directory.
> header files are already present in cygwin\usr\include.
> I have placed cygwin on the same location where it was present in my
> machine C:\cygwin.
> In my PATH , i have set C:\cygwin\bin .
I would try the -v option and check where gcc searches for your header
- Andi -