문제

OpenCV 및 Armadillo를 사용하여 Eclipse CDT를 사용하여 일부 응용 프로그램을 컴파일하고 있습니다. 다음 오류가 발생합니다.

In file included from /usr/include/armadillo:108:0,
             from /home/bmmo/workspace/GS/Source/IMU/MagRLS.h:11,
             from /home/bmmo/workspace/GS/Source/IMU/IMU_class.h:11,
             from ../Source/Navigation/NAV2/nav2_get_u.cpp:2:
/usr/include/armadillo_bits/lapack_bones.hpp:235:106: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/armadillo_bits/lapack_bones.hpp:236:106: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/armadillo_bits/lapack_bones.hpp:295:139: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/armadillo_bits/lapack_bones.hpp:296:139: error: expected ‘,’ or ‘...’ before numeric constant
In file included from /usr/include/armadillo:112:0,
             from /home/bmmo/workspace/GS/Source/IMU/MagRLS.h:11,
             from /home/bmmo/workspace/GS/Source/IMU/IMU_class.h:11,
             from ../Source/Navigation/NAV2/nav2_get_u.cpp:2:
/usr/include/armadillo_bits/lapack_wrapper.hpp:184:31: error: expected ‘,’ or ‘...’ before numeric constant
/usr/include/armadillo_bits/lapack_wrapper.hpp: In function ‘void arma::lapack::geev(char*, char*, arma::blas_int*, eT*, arma::blas_int*, eT*)’:
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:74: error: ‘wi’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:82: error: ‘vl’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:86: error: ‘ldvl’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:96: error: ‘vr’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:100: error: ‘ldvr’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:110: error: ‘work’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:116: error: ‘lwork’ was not declared in this scope
/usr/include/armadillo_bits/lapack_wrapper.hpp:195:123: error: ‘info’ was not declared in this scope
.

아무 문제없이 더 작은 응용 프로그램을 컴파일 할 수 있지만 더 큰 프로젝트 (동일한 구성 사용)를 사용하면이 오류가 발생합니다.무엇이 잘못 될 수 있습니까?

도움이 되었습니까?

해결책

armadillo 헤더가 OpenCV 헤더 앞에 포함됩니다.opencv는 armadillo에서 사용하는 함수 및 / 또는 변수 이름을 방해하는 몇 가지 잘못된 #defines를 사용합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top