undefined reference to `cv::VideoCapture::VideoCapture()'

guanlin@guanlin-virtual-machine:~/OpenNI2Samples/build$ make
[ 10%] Built target InfraredOniFileRecorder
[ 15%] Linking CXX executable ColorReaderUVC
CMakeFiles/ColorReaderUVC.dir/ColorReaderUVC.cpp.o: In function `main':
ColorReaderUVC.cpp:(.text.startup+0x215): undefined reference to `cv::VideoCapture::VideoCapture()'
ColorReaderUVC.cpp:(.text.startup+0x21f): undefined reference to `cv::VideoCapture::open(int)'
ColorReaderUVC.cpp:(.text.startup+0x227): undefined reference to `cv::VideoCapture::isOpened() const'
ColorReaderUVC.cpp:(.text.startup+0x244): undefined reference to `cv::VideoCapture::~VideoCapture()'
ColorReaderUVC.cpp:(.text.startup+0x273): undefined reference to `cv::VideoCapture::~VideoCapture()'
ColorReaderUVC.cpp:(.text.startup+0x295): undefined reference to `cv::VideoCapture::set(int, double)'
ColorReaderUVC.cpp:(.text.startup+0x2aa): undefined reference to `cv::VideoCapture::set(int, double)'
ColorReaderUVC.cpp:(.text.startup+0x2bf): undefined reference to `cv::VideoCapture::set(int, double)'
ColorReaderUVC.cpp:(.text.startup+0x311): undefined reference to `cv::VideoCapture::operator>>(cv::Mat&)'
collect2: error: ld returned 1 exit status
CMakeFiles/ColorReaderUVC.dir/build.make:94: recipe for target 'ColorReaderUVC' failed
make[2]: *** [ColorReaderUVC] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ColorReaderUVC.dir/all' failed
make[1]: *** [CMakeFiles/ColorReaderUVC.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
 

ubuntu下找不到VideoCapture类,原因是没有将libopencv_videoio.so连接进来。

你可能感兴趣的:(图像处理)