我去了一个标准的ATLAS编译器。所有测试都通过了,但是当我尝试使用以下命令进行编译时:
gcc prog.c -o prog -I/home/atlas_build/include -L/home/atlas_build/lib -llapack -lcblas -lm
它产生了一些错误:
dsyevr.f:(.text+0xbb): undefined reference to `lsame_'
dsyevr.f:(.text+0xe3): undefined reference to `lsame_'
dsyevr.f:(.text+0x102): undefined reference to `lsame_'
dsyevr.f:(.text+0x125): undefined reference to `lsame_'
dsyevr.f:(.text+0x148): undefined reference to `lsame_'
/home/atlas_build/lib/liblapack.a(dsyevr.o):dsyevr.f:(.text+0x1ac): more undefined references to `lsame_' follow
/home/atlas_build/lib/liblapack.a(dsyevr.o): In function `dsyevr_':
dsyevr.f:(.text+0x39e): undefined reference to `xerbla_'
dsyevr.f:(.text+0x742): undefined reference to `dscal_'
dsyevr.f:(.text+0x7cb): undefined reference to `dscal_'
dsyevr.f:(.text+0x9cb): undefined reference to `dcopy_'
dsyevr.f:(.text+0xa15): undefined reference to `dcopy_'
dsyevr.f:(.text+0xa84): undefined reference to `dcopy_'
dsyevr.f:(.text+0xac2): undefined reference to `dcopy_'
dsyevr.f:(.text+0x1146): undefined reference to `dscal_'
dsyevr.f:(.text+0x124b): undefined reference to `dswap_'
它持续不断,抱怨缺少BLAS函数,例如dscal_,dcopy_等。我已经截断了输出。为什么会这样呢?
最佳答案
解决了这个。需要链接到lgfortran。
关于c - ATLAS-LAPACK未链接到BLAS,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31038366/