/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0‘

  • Post author:
  • Post category:其他


···

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadRGBAStrip@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadDirectory@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFWriteEncodedStrip@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFIsTiled@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFWriteScanline@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

_TIFFfree@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFGetField@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFNumberOfStrips@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFScanlineSize@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFWriteDirectory@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadEncodedTile@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadRGBATile@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFClose@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFClientOpen@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFRGBAImageOK@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFOpen@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadEncodedStrip@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFSetField@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFSetWarningHandler@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFSetErrorHandler@LIBTIFF_4.0’

/usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

_TIFFmalloc@LIBTIFF_4.0' /usr/local/lib/libopencv_imgcodecs.so.3.4.2: undefined reference to

TIFFReadScanline@LIBTIFF_4.0’

collect2: error: ld returned 1 exit status

CMakeFiles/TStoneCalib.dir/build.make:401: recipe for target ‘TStoneCalib’ failed

make[2]: *** [TStoneCalib] Error 1

CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/TStoneCalib.dir/all’ failed

make[1]: *** [CMakeFiles/TStoneCalib.dir/all] Error 2

Makefile:83: recipe for target ‘all’ failed

make: *** [all] Error 2

···

//usr/local/lib/libopencv_imgcodecs.so.3.4:对‘TIFFReadRGBAStrip@LIBTIFF_4.0’未定义的引用

原因:TIFF的库发生了冲突

解决办法:conda remove libtiff

我是装了conda的,对我来说是这样解决,网上很多解决不了。亲测有效。参考文献:https://www.cnblogs.com/laowangxieboke/p/12680821.html

方法二:(也亲测有效,原理很好理解,也不用卸载conda安装的库)

修改cmakelist,增加

···

SET(CMAKE_PREFIX_PATH “/usr/lib/x86_64-linux-gnu/cmake”)

···

参考文献:https://www.freesion.com/article/65231575114/



版权声明:本文为LB_csdn_原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。