アルマジロの使い方について質問です。
私は Ubuntu 12.10 と Code::Blocks の gcc コンパイラを使用しています。シナプス パッケージ マネージャーを使用して LAPACK と BLAS をインストールしました。また、シナプス パッケージ マネージャーを使用して 1 回、CMake を使用して手動で Armadillo をインストールしました。CMake は、armadillo コンパイルの構成を作成しているときに、LAPACK および BLAS ライブラリを見つけました。さらに「Build Options」→「Linker」のCode::Blocksで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_'|
これは明らかにアルマジロが 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 a high-speed replacement for BLAS,
//// such as OpenBLAS, GotoBLAS, Intel MKL, AMD ACML, or the Accelerate framework.
//// BLAS is used for matrix multiplication.
//// Without BLAS, matrix multiplication will still work, but might be slower.
#endif
/* #undef ARMA_USE_WRAPPER */
//// Comment out the above line if you're getting linking errors when compiling your programs,
//// or if you prefer to directly link with LAPACK and/or BLAS.
//// You will then need to link your programs directly with -llapack -lblas instead of -larmadillo
整数で行列を設定しようとするとエラーが最初に表示されるので、
Mat<int> element_nodes;
役立つ回答をいただければ幸いです。私は数時間インターネットを検索しました。また、さらにソース コードが必要な場合はお知らせください。