我在NVidia/Cuda:7.5-cudnn4-devel-centos7 Docker容器中设置了opencv 2.4.10。运行make install
几乎完成,然后我收到此错误:
[ 99%] Built target opencv_haartraining_engine
Linking CXX executable ../../bin/opencv_createsamples
CMakeFiles/opencv_createsamples.dir/createsamples.cpp.o: In function `main':
createsamples.cpp:(.text.startup.main+0x2cb): undefined reference to `JpgDatasetGenerator::JpgDatasetGenerator(char const*)'
createsamples.cpp:(.text.startup.main+0x31f): undefined reference to `DatasetGenerator::create(char const*, int, int, char const*, int, int, int, double, double, double, bool, int, int)'
createsamples.cpp:(.text.startup.main+0x773): undefined reference to `PngDatasetGenerator::PngDatasetGenerator(char const*)'
createsamples.cpp:(.text.startup.main+0x7af): undefined reference to `cvCreateTrainingSamplesFromInfo(char const*, char const*, int, int, int, int)'
createsamples.cpp:(.text.startup.main+0x814): undefined reference to `cvCreateTrainingSamples(char const*, char const*, int, int, char const*, int, int, int, double, double, double, bool, int, int)'
createsamples.cpp:(.text.startup.main+0x857): undefined reference to `cvShowVecSamples(char const*, int, int, double)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [apps/haartraining/CMakeFiles/opencv_createsamples.dir/all] Error 2
make: *** [all] Error 2
我能够在CentOS 6中使用opencv 2.4.10与CUDA 7.0一起使用,但是这个问题出现在带有CUDA 7.5的CentOS 7中。
答案 0 :(得分:0)
我仍然不确定为什么这一步是必要的,而不是我的CentOS 6 / CUDA 7.0设置;我还惊讶地发现,直到make install
进程到目前为止这个修复都没有必要,但解决方案只是
make clean
然后
make install