I can compile a Fortran code using
gfortran -o $target *.o -lblas
But it does not compile with
gfortran -lblas -o $target *.o
Why does it depend on the position of the -lblas
flag? Is it the standard behavior? If not, how can I troubleshoot?
The BLAS
libraries are in a non-standard location and set in the LD_LIBRARY_PATH
environment variables. Running gfortran v9.3.0
on Ubuntu 20.04
.