LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   GCC include path. (https://www.linuxquestions.org/questions/linux-general-1/gcc-include-path-1621/)

jwilson 04-02-2001 02:25 PM

How I can include the path

/root/linux/include

to my GCC include path so that header files there would be recognized?

Or how would I create a symlink in /usr/include to point to /root/linux/include

Any help would be greatly appreciated.

/jeff

bickford 04-02-2001 03:58 PM

You could just explicitly declare where the header file is, like:
#include "/some/dir/file.h"

Or, like you were saying make a symlink to that file in a directory where your install of gcc already knows to look for the header files.

Make a symlink like this:
$ ln -s /root/include/originalFile /usr/include/linkFile

will create a link in /usr/include which references the file in /root/include/


All times are GMT -5. The time now is 09:55 AM.