Я пытаюсь использовать матричную библиотеку Armadillo для выполнения матричных вычислений, и ей нужны BLAS и LAPACK. В документации Armadillo рекомендуется получать предварительно скомпилированные версии из http://www.stanford.edu/~vkl/code/libs.html
Там есть файлы .lib и .dll. Единственная проблема в том, что я не знаю, как заставить Visual Studio (Express Edition 2008) распознавать эти файлы. Я пытаюсь скопировать их в каталоги include и lib Visual C ++ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\
и C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\
, но, похоже, ничего не происходит, потому что, когда я пытаюсь скомпилировать свою программу, я получаю множество ошибок "неразрешенного внешнего символа" говорят, что не могут найти функции LAPACK.
EDIT:
Вот сообщения об ошибках:
1>Linking...
1>LINK : warning LNK4076: invalid incremental status file 'C:\Users\User\Documents\Visual Studio 2008\Projects\TentPitcher\Debug\TentPitcher.ilk'; linking nonincrementally
1> Creating library C:\Users\User\Documents\Visual Studio 2008\Projects\TentPitcher\Debug\TentPitcher.lib and object C:\Users\User\Documents\Visual Studio 2008\Projects\TentPitcher\Debug\TentPitcher.exp
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _zgetrf_ referenced in function "void __cdecl arma::lapack::getrf_(int *,int *,double *,int *,int *,int *)" (??$getrf_@N@lapack@arma@@YAXPAH0PAN000@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _zgetrf_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _cgetrf_ referenced in function "void __cdecl arma::lapack::getrf_(int *,int *,double *,int *,int *,int *)" (??$getrf_@N@lapack@arma@@YAXPAH0PAN000@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _cgetrf_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _dgetrf_ referenced in function "void __cdecl arma::lapack::getrf_(int *,int *,double *,int *,int *,int *)" (??$getrf_@N@lapack@arma@@YAXPAH0PAN000@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _dgetrf_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _sgetrf_ referenced in function "void __cdecl arma::lapack::getrf_(int *,int *,double *,int *,int *,int *)" (??$getrf_@N@lapack@arma@@YAXPAH0PAN000@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _sgetrf_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _zgemv_ referenced in function "void __cdecl arma::blas::gemv_(char const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemv_@N@blas@arma@@YAXPBDPBH1PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _zgemv_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _zgemv_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _cgemv_ referenced in function "void __cdecl arma::blas::gemv_(char const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemv_@N@blas@arma@@YAXPBDPBH1PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _cgemv_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _cgemv_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _dgemv_ referenced in function "void __cdecl arma::blas::gemv_(char const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemv_@N@blas@arma@@YAXPBDPBH1PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _dgemv_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _dgemv_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _sgemv_ referenced in function "void __cdecl arma::blas::gemv_(char const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemv_@N@blas@arma@@YAXPBDPBH1PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _sgemv_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _sgemv_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _zgemm_ referenced in function "void __cdecl arma::blas::gemm_(char const *,char const *,int const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemm_@N@blas@arma@@YAXPBD0PBH11PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _zgemm_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _zgemm_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _cgemm_ referenced in function "void __cdecl arma::blas::gemm_(char const *,char const *,int const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemm_@N@blas@arma@@YAXPBD0PBH11PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _cgemm_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _cgemm_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _dgemm_ referenced in function "void __cdecl arma::blas::gemm_(char const *,char const *,int const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemm_@N@blas@arma@@YAXPBD0PBH11PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _dgemm_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _dgemm_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _sgemm_ referenced in function "void __cdecl arma::blas::gemm_(char const *,char const *,int const *,int const *,int const *,double const *,double const *,int const *,double const *,int const *,double const *,double *,int const *)" (??$gemm_@N@blas@arma@@YAXPBD0PBH11PBN21212PAN1@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _sgemm_
1>TwoCell3DXT.obj : error LNK2001: unresolved external symbol _sgemm_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _zgetri_ referenced in function "void __cdecl arma::lapack::getri_(int *,double *,int *,int *,double *,int *,int *)" (??$getri_@N@lapack@arma@@YAXPAHPAN00100@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _zgetri_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _cgetri_ referenced in function "void __cdecl arma::lapack::getri_(int *,double *,int *,int *,double *,int *,int *)" (??$getri_@N@lapack@arma@@YAXPAHPAN00100@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _cgetri_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _dgetri_ referenced in function "void __cdecl arma::lapack::getri_(int *,double *,int *,int *,double *,int *,int *)" (??$getri_@N@lapack@arma@@YAXPAHPAN00100@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _dgetri_
1>Cell3DXT.obj : error LNK2019: unresolved external symbol _sgetri_ referenced in function "void __cdecl arma::lapack::getri_(int *,double *,int *,int *,double *,int *,int *)" (??$getri_@N@lapack@arma@@YAXPAHPAN00100@Z)
1>ThreeCell3DXT.obj : error LNK2001: unresolved external symbol _sgetri_
1>TwoCell3DXT.obj : error LNK2019: unresolved external symbol _dgesvd_ referenced in function "void __cdecl arma::lapack::gesvd_(char *,char *,int *,int *,double *,int *,double *,double *,int *,double *,int *,double *,int *,int *)" (??$gesvd_@N@lapack@arma@@YAXPAD0PAH1PAN122121211@Z)
1>TwoCell3DXT.obj : error LNK2019: unresolved external symbol _sgesvd_ referenced in function "void __cdecl arma::lapack::gesvd_(char *,char *,int *,int *,double *,int *,double *,double *,int *,double *,int *,double *,int *,int *)" (??$gesvd_@N@lapack@arma@@YAXPAD0PAH1PAN122121211@Z)
1>C:\Users\User\Documents\Visual Studio 2008\Projects\TentPitcher\Debug\TentPitcher.exe : fatal error LNK1120: 18 unresolved externals
1>Build log was saved at "file://c:\Users\User\Documents\Visual Studio 2008\Projects\TentPitcher\TentPitcher\Debug\BuildLog.htm"
1>TentPitcher - 43 error(s), 1 warning(s)
"Cell3DXT
", "TwoCell3DXT
" и "ThreeCell3DXT
" являются классами в моем собственном коде. Также в файлах LAPACK и BLAS, приведенных выше, есть «.exp файлы» - что это такое и имеют ли они какое-то отношение к проблеме?