1.編譯時候出現
make: * [.build_release/examples/siamese/convert_mnist_siamese_data.bin] Error 1
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadDirectory@LIBTIFF_4.0'
TIFFWriteEncodedStrip@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFIsTiled@LIBTIFF_4.0'
TIFFOpen@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0'
TIFFSetField@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFWriteScanline@LIBTIFF_4.0'
TIFFGetField@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFScanlineSize@LIBTIFF_4.0'
TIFFNumberOfStrips@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFSetWarningHandler@LIBTIFF_4.0'
TIFFSetErrorHandler@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFReadEncodedTile@LIBTIFF_4.0'
TIFFReadRGBATile@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to TIFFClose@LIBTIFF_4.0'
TIFFRGBAImageOK@LIBTIFF_4.0’
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to
/usr/local/lib/libopencv_imgcodecs.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0’
collect2: error: ld returned 1 exit status
這個多是權限問題,採用如下指令:
sudo su;
make all -j16;
make test -j16;
make runtest -j16;
make pycaffe;
一切都能順利解決。ui
3.openCV program compile error 「libopencv_core.so.2.4: cannot open shared object file: No such file or directory」 坑內是opencv版本有問題,或者路徑沒加。從新編譯或者加路徑。code