linking with shared object. Can we use -L?
by centguy from LinuxQuestions.org on (#57HT8)
This is working:
Quote:
But then
this is not working:
Quote:
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...


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 |
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...