[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] unable to link and run a simple program
From: |
Mohammad Akhlaghi |
Subject: |
Re: [Help-gsl] unable to link and run a simple program |
Date: |
Tue, 10 Apr 2018 10:22:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Hi Vasu,
This is a dynamic linker problem. Linking with shared libraries is done
every time you run a program. The compiler has indeed found the
libraries and that is why your `a.out' has been created.
The dynamic linker looks into the `LD_LIBRARY_PATH' shell variable to
find the libraries. So you have to put `/myinst/lib/' in this variable.
You can do this with a command like below. You can also put it in your
`~/.bashrc' to be available at startup of your interactive bash sessions.
export LD_LIBRARY_PATH="/myinst/lib/:$LD_LIBRARY_PATH"
For more on custom installation paths, you can see the explanations in
the link below.
https://www.gnu.org/software/gnuastro/manual/html_node/Installation-directory.html
Cheers,
Mohammad