This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc default include path


> 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
> displaying
> "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
> friend
> 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
files  ...

- Andi -

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]