This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Re: undefined reference
- From: Jeff Spirko <spirko at Lehigh dot EDU>
- To: Cheng Xing <cx101 at ohm dot york dot ac dot uk>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Mon, 22 Sep 2003 14:53:37 -0400
- Subject: Re: Re: undefined reference
- References: <3F6F42E1.80008@ohm.york.ac.uk>
On Mon, Sep 22, 2003 at 07:43:45PM +0100, Cheng Xing wrote:
> Well, I input gsl-config --lib, and get
> -L/usr/local/lib -lgsl -lgslcblas -lm
> So is that ok to compile with 'gcc filename -lgsl -lgslcblas -lm'?
> I did compile successfully this time, but got another warning message
> when run the file a.out. It said:
> a.out: error while loading shared libraries: libgsl.so.0 : cannot open
> shared object file: No such file or directory.
> But I did find this file in my usr/local/lib
You can either add /usr/local/lib to the list of directories that
are searched for libraries, by adding it to /etc/ld.so.conf and
running (as root) ldconfig. Or, you can run your program with
LD_LIBRARY_PATH=/usr/local/lib a.out
--
Jeff Spirko spirko@lehigh.edu spirko@yahoo.com WD3V |=>
/* - * - * - * - * - * - * - *\
Check out my Blog at | http://spirko.blogspot.com/ |
\* - * - * - * - * - * - * - */
The study of non-linear physics is like the study of non-elephant biology.
All theoretical chemistry is really physics;
and all theoretical chemists know it. -- Richard P. Feynman