Re: [Help-gsl] unable to link and run a simple program
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
Re: [Help-gsl] unable to link and run a simple program
tried directly linking with /myinst/libgslcbals.so.0.0.0 and libgsl.so.23.0.0 and tried directly linking with libgsl.so.0 and libglscblas.so.23.0 (the symbolic links) like this gcc gsl_test.o /myinst/lib/libgslcblas.so.0 /myinst/lib/libgsl.so.23 /myinst is not a folder in /, my install directory in several directories deep into my /home/myname/ there are no permissions issues, my system is ubuntu 16.04 On Mon, Apr 9, 2018 at 9:00 PM, Vasu Jaganath wrote: > there are symbolic links > > libgsl.so.23 and libgslcblas.so.0 which point to the correct libraries > but > i still get the same error > > On Mon, Apr 9, 2018 at 8:46 PM, Vasu Jaganath > wrote: > >> Hi, >> >> I have installed gsl-2.4 in a custom directory. >> >> using this blogpost >> >> https://coral.ise.lehigh.edu/jild13/2016/07/11/hello/ >> >> when I try to run my a.out >> >> I get the following message >> >> ./a.out: error while loading shared libraries: libgsl.so.23: cannot open >> shared object file: No such file or directory >> >> >> I have checked in my /myinst/lib/ directory there >> >> exists a libgsl.so.23.0.0 file >> >> I have double-checked my linking path and include path yet this error >> persists. >> >> I am able to run the binaries from /myinst/bin/ directory >> >> Thanks, >> Vasu >> > >
Re: [Help-gsl] unable to link and run a simple program
there are symbolic links libgsl.so.23 and libgslcblas.so.0 which point to the correct libraries but i still get the same error On Mon, Apr 9, 2018 at 8:46 PM, Vasu Jaganath wrote: > Hi, > > I have installed gsl-2.4 in a custom directory. > > using this blogpost > > https://coral.ise.lehigh.edu/jild13/2016/07/11/hello/ > > when I try to run my a.out > > I get the following message > > ./a.out: error while loading shared libraries: libgsl.so.23: cannot open > shared object file: No such file or directory > > > I have checked in my /myinst/lib/ directory there > > exists a libgsl.so.23.0.0 file > > I have double-checked my linking path and include path yet this error > persists. > > I am able to run the binaries from /myinst/bin/ directory > > Thanks, > Vasu >
[Help-gsl] unable to link and run a simple program
Hi, I have installed gsl-2.4 in a custom directory. using this blogpost https://coral.ise.lehigh.edu/jild13/2016/07/11/hello/ when I try to run my a.out I get the following message ./a.out: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory I have checked in my /myinst/lib/ directory there exists a libgsl.so.23.0.0 file I have double-checked my linking path and include path yet this error persists. I am able to run the binaries from /myinst/bin/ directory Thanks, Vasu