what is default path for header file included in c program?

Jeegar Patel picture Jeegar Patel · Oct 20, 2011 · Viewed 30.9k times · Source

see if i write in any c file like

#include "header.h"

then it will search this file in current directory

but when i write

#include <header.h>

then where it will go to find this file ? what is defualt path for header file included in c program?

see i have installed gstreamer in /usr/local but when i am including

#include <gst/gst.h>

i am geeting fatal error: gst/gst.h: No such file or directory

How can i remove this error?

Answer

Nate picture Nate · Oct 20, 2011

Try running gcc -v -E -. When I do, part of the output is as follows:

#include <...> search starts here:
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/i686-linux-gnu/4.6.1/include-fixed
 /usr/include/i386-linux-gnu
 /usr/include

It's not an answer to the gstreamer question, but I hope this still helps!

Pulled from here