2013-12-16 5 views
0

최신 Armadillo 패키지 (3.920)를 다운로드했으며이를 내 컴퓨터 (Ubuntu 12.04)에서 사용하려고합니다. 설치 (cmake., make, sudo make install)에 대한 readme.txt 파일에 언급 된 단계를 따르고 있습니다. 나는 내 시스템에 배낭과 블래지어가있다. 내가 사용 예제 디렉토리에 제공되는 예제를 실행하려고하면 : g ++ example1.cpp -O2 -larmadillo 나는 오류 얻을 : ATL_zptgemm' /usr/lib/liblapack.so.3gf: undefined reference to ATL_scopy ' 등Armadillo 사용 중 오류가 발생했습니다.

에 정의되지 않은 참조 : /usr/lib/liblapack.so.3gf를

나는 와 예제를 실행하려고하면 g ++ example1.cpp -O2 -llpack -lblas -lgfortran 나는 오류 얻을 : /tmp/ccOsKhfg.o : /tmp/ccOsKhfg.o '기능 double arma::blas::dot<double>(unsigned int, double const*, double const*)': example1.cpp:(.text._ZN4arma4blas3dotIdEET_jPKS2_S4_[double arma::blas::dot<double>(unsigned int, double const*, double const*)]+0x36): undefined reference to wrapper_ddot_에서을 : 기능 있음 void arma::blas::gemv<double>(char const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*)': example1.cpp:(.text._ZN4arma4blas4gemvIdEEvPKcPKiS5_PKT_S8_S5_S8_S5_S8_PS6_S5_[void arma::blas::gemv<double>(char const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*)]+0x53): undefined reference to wrapper_dgemv_ ' /tmp/ccOsKhfg.o : 기능 있음 void arma::blas::gemm<double>(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*)': example1.cpp:(.text._ZN4arma4blas4gemmIdEEvPKcS3_PKiS5_S5_PKT_S8_S5_S8_S5_S8_PS6_S5_[void arma::blas::gemm<double>(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*)]+0x61): undefined reference to wrapper_dgemm_'

내가 '#define ARMA_USE_LAPACK'줄을 주석 처리하면 config.hpp에서 '# define ARMA_USE_BLAS'를 정의 할 수 있는데 예 1을 실행할 수 있지만 예제 2는 실행할 수 없다는 점에 유의하십시오.

문제 해결에 대해 안내해 주실 수 있습니까? 감사합니다. . Salil

+1

질문을 제출하기 전에 서식을 정리해야합니다. 다음을 검토하십시오. http://stackoverflow.com/editing-help –

답변

0

질문을 볼 때 -llpack 대신 -llapack을 입력해야한다고 생각합니다.
-lgfortan이 없으면 작동 할 수도 있습니다.

g++ main.cpp -o main -o1 -larmadillo -llapack -lblas

관련 문제