0
OpenNI 샘플을 빌드하기 위해 CMakeLists.txt 파일을 작성했습니다. NiSimpleViewer를 성공적으로 빌드합니다. NiUserTracker와 시도 내가이 오류를 얻을 때 : CMakeLists.txt로 OpenNI 샘플을 빌드하려고했지만 오류가 발생했습니다.
35 warnings generated.
Linking CXX executable main
ld: warning: path '/usr/lib/libOpenNI.dylib' following -L not a directory
Undefined symbols for architecture x86_64:
"DrawDepthMap(xn::DepthMetaData const&, xn::SceneMetaData const&)", referenced from:
glutDisplay() in main.cpp.o
"MyPoseInProgress(xn::PoseDetectionCapability&, char const*, unsigned int, XnPoseDetectionStatus, void*)", referenced from:
_main in main.cpp.o
"MyCalibrationInProgress(xn::SkeletonCapability&, unsigned int, XnCalibrationStatus, void*)", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
이
은 내가 사용하는 CMakeLists입니다. 그게 뭐가 잘못 됐는지 말해줘? 폴더 외부 빌드의내용은/I 추측
CMakeLists.txt Libs build opengles.cpp
GL SceneDrawer.cpp glh opengles.h
GLES SceneDrawer.h main.cpp
더 나은 점은'link_directories' 명령을 모두 제거하는 것입니다. 여기서는 필요하지 않아야하며 [자체 문서] (http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:link_directory)는 사용을 꺼립니다. – Fraser
지금은 무엇이 오류입니까? – arrowd
완료! 결과 : 동일 :(빌드 할 수 없음 '링크 CXX 실행 가능 메인 아키텍처 x86_64에 대한 정의되지 않은 기호 : 에서 참조 된 "DrawDepthMap (xn :: DepthMetaData const &, xn :: SceneMetaData const &)", glutDisplay .cpp.o main.cpp.o에있는 메인 : "MyPoseInProgress (xn :: PoseDetectionCapability & char const *, 부호없는 int, XnPoseDetectionStatus, void *)" "MyCalibrationInProgress (xn :: SkeletonCapability & 참조 : _main in main.cpp.o ld : 심볼이 아키텍처에서 발견되지 않음 x86_64' –