我在ubuntu 18.4 LTS中使用gcc编译了BLAS和LAPACK库。 静态库与Armadillo标头一起正常工作,但是共享的lapack库却出现错误,其中包含28个未定义的blas函数引用,我认为它们是“ Extra Precise BLAS例程” ”。我不知道我是否在构建lapack共享库时出错了!犰狳的链接错误如下:
g++ -o ../../lib/Debug/numlib ../../lib/Debug/src/arma_test_1.o ../../lib/Debug/src/blas_test.o ../../lib/Debug/src/cmatrix_test.o ../../lib/Debug/src/main.o ../../lib/Debug/liblapack.so ../../lib/Debug/libblas.so ../../../../../../../usr/lib/gcc/x86_64-linux-gnu/7.3.0/libgfortran.a ../../../../../../../usr/lib/gcc/x86_64-linux-gnu/7.3.0/libquadmath.a
../../lib/Debug/liblapack.so: undefined reference to `blas_sgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_chemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_csymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zsymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_csymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_ssymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_ssymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dsymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zhemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_chemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zhemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zsymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dsymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgemv_x_'
collect2:错误:ld返回1个退出状态
这是关于armadillo + Lapack(由netlib的LAPACK src构建的共享库。)的具体说明...我想知道这些BLAS例程的可能来源,而netlib的BLAS和LAPACK中没有这些例程!
答案 0 :(得分:0)
XBLAS需要集成。详细信息可以在以下链接中找到。