小编use*_*647的帖子

未定义参考Armadillo的LAPACK包装器

我对犰狳的使用有疑问.

我正在使用Ubuntu 12.10,以及Code :: Blocks中的gcc编译器.我使用synaptic包管理器安装了LAPACK和BLAS.我还使用突触包管理器安装了一次Armadillo,一次是用CMake手动安装的.CMake在进行犰狳编译的配置时找到了LAPACK和BLAS库.此外,我在"构建选项" - >"链接器"中的代码::块中链接了BLAS和LAPACK的库.

但是,每当我想构建我的项目时,我都会收到错误消息:

 In function `void arma::lapack::getrf<double>(int*, int*, double*, int*, int*, int*)':|
/usr/include/armadillo_bits/lapack_wrapper.hpp|41|undefined reference to `wrapper_dgetrf_'|
Run Code Online (Sandbox Code Playgroud)

这显然意味着犰狳找不到LAPACK,但我做错了什么?

我还取消了armadillo_bits/config.hpp文件中各自的行,因此它看起来像这样:

    #if !defined(ARMA_USE_LAPACK)
    //#define ARMA_USE_LAPACK
    //// Uncomment the above line if you have LAPACK or a high-speed replacement for LAPACK,
    //// such as Intel MKL, AMD ACML, or the Accelerate framework.
    //// LAPACK is required for matrix decompositions (eg. SVD) and matrix inverse.
    #endif

    #if !defined(ARMA_USE_BLAS)
    //#define ARMA_USE_BLAS
    //// Uncomment the above line if you have BLAS or …
Run Code Online (Sandbox Code Playgroud)

c++ linker lapack armadillo

5
推荐指数
1
解决办法
7446
查看次数

标签 统计

armadillo ×1

c++ ×1

lapack ×1

linker ×1