简体   繁体   中英

trouble linking lapack

i am trying to link lapack and a simple

locate lapack

returns

/usr/lib64/liblapack.so.3
/usr/lib64/liblapack.so.3.2.1

so in am trying to link it with

gfortran -o linreg driver.f90 LFsubroutines.f90 -L/usr/lib64 -llapack -fimplicit-none

but i get the following error:

/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -llapack

what is the problem here?

You don't have the liblapack.so or liblapack.a file there (maybe you didn't install dev(el) package). You may try specifying the complete path instead

gfortran -o linreg driver.f90 LFsubroutines.f90 /usr/lib64/liblapack.so.3 -fimplicit-none

Try installing the following packages if you don't have the devel packages installed already on your system.

sudo yum install libgfortran libf2c blas lapack

Give that a shot...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM