help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Comiling and Linking a C Program That Includes The GSL


From: Martin Jansche
Subject: Re: [Help-gsl] Comiling and Linking a C Program That Includes The GSL
Date: Tue, 20 Dec 2005 10:57:57 -0500

On 12/19/05, Jeff Leuschner <address@hidden> wrote:

> my linking line is: gcc -L/usr/local/csw/lib example1.o -lgsl -lgslcblas -lm
> This creates an a.out* file.
>
> Then when I type a.out, I get the following error:
> ld.so.1: a.out: fatal: libgsl.so.0: open failed: No such file or directory
> Killed

That probably means /usr/local/csw/lib isn't in your library search
path (check with "ldd a.out"). You have three options:

1. Do "env LD_LIBRARY_PATH=/usr/local/csw/lib:$LD_LIBRARY_PATH
./a.out". Try this first -- if it solves your problem, you know that
the library path was indeed the issue.

2. Add /usr/local/csw/lib to the dynamic linker's config file,
typically /etc/ld.so.conf .
3. Give additional arguments to the linker to modify the runtime
search path of the executable. This varies considerably (options like
-R or -rpath), check your linker's man page.

-- mj




reply via email to

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