undefined reference
Jeff Spirko
spirko@Lehigh.EDU
Mon Sep 22 18:53:00 GMT 2003
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
More information about the Gsl-discuss
mailing list