gnu.gcc.help
[Top] [All Lists]

Re: the compiler search apth

Subject: Re: the compiler search apth
From: Paul Pluzhnikov
Date: Sat, 22 Jul 2006 11:41:16 -0700
Newsgroups: gnu.gcc.help
Gary Wessle <phddas@xxxxxxxxx> writes:

> could you please tell me how can I add a given directory to the
> standard search path for the compiler and also for the linker?

You can't (well, not without recompiling gcc); but you don't need to.
Just add it to your compile and link lines:

  gcc -I /usr/local/include/gsl -c foo.c
  gcc -o foo foo.o -L /usr/local/lib/gsl -lgsl

[If libgsl is a shared library, you may also need to add
 -Wl,-rpath=/usr/local/lib/gsl]

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy