How do I add search paths to gcc

Eduardo Cerejo ejcerejo at
Fri Mar 21 11:43:27 PDT 2008

My gcc is only looking in /usr/lib and /usr/include for libraries and hearders and I added the paths /usr/local/lib/ and /usr/local/include to my .cshrc file:

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/local/lib /usr/local/include $HOME/bin)

but I still have to use gcc with -I and -L switch for a program to compile or else it will fail.  

I'm using tcsh.

More information about the freebsd-questions mailing list