Article 57HT8 linking with shared object. Can we use -L?

linking with shared object. Can we use -L?

by
centguy
from LinuxQuestions.org on (#57HT8)
This is working:

Quote:

gfortran -fPIC -ffree-line-length-0 -o fm-forces types_and_constants.o sgsym.o commod.o fm-forces.f90 /usr/lib64/liblapack.so.3 /usr/lib64/libblas.so.3
But then

this is not working:

Quote:

gfortran -fPIC -ffree-line-length-0 -o fm-forces types_and_constants.o sgsym.o commod.o fm-forces.f90 -L/usr/lib64 -llapack -lblas
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
make: *** [Makefile:33: fm-forces] Error 1

So I am forced to use the full path to each of the .so.x object?

If it is .a, then -L"path-to-lapack-blas" -llapack -lblas
will just work.

Such an embarassing question...latest?d=yIl2AUoC8zA latest?i=s8FSfUjXZNk:5ZFiHgx_icA:F7zBnMy latest?i=s8FSfUjXZNk:5ZFiHgx_icA:V_sGLiP latest?d=qj6IDK7rITs latest?i=s8FSfUjXZNk:5ZFiHgx_icA:gIN9vFws8FSfUjXZNk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments