help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] GSL linking help


From: Joakim Hove
Subject: Re: [Help-gsl] GSL linking help
Date: Tue, 16 Dec 2003 11:06:25 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Haoyue Wang <address@hidden> writes:


> The linking did not work:

[...]

> Note that I set up the 1.4 version of the GSL.  libgsl.la (not .a) is
> under the directory /home/hw/aaa/gsl-1.4, and libgslcblas.la is under
> gsl-1.4/cblas.  

Well, when you have the libraries installed in a nonstandard location
(i.e. not /lib /usr/lib /usr/local/lib ....) ,you must tell the
compiler/linker where to find the libraries:

  gcc -L/path/to/lib1 -L/path/to/lib2 temp.o -lgsl -lgslcblas -lm

When the linker is satisfied you are still not done. If you try
starting your application, the dynamic loader will not find the
libraries, this can be specified by

 1. Setting the environment variable LD_LIBRARY_PATH to point at the
    right directories.

or

 2. (If you have root priveliges) to edit the file /etc/ld.so.conf and
    then rerun /sbin/ldconfig.

Observe that *none* is particular to the gsl library.

HTH Joakim

-- 
  /--------------------------------------------------------------------\
 / Joakim Hove  / address@hidden  /  (55 5) 84076       |                 \
 | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
 | CMU                                                | 5231 Paradis    |
 \ Thormøhlensgt.55, 5020 Bergen.                     | 55 91 28 18     /
  \--------------------------------------------------------------------/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]