编译问题形似undefined reference to `_TIFFxxxx@LIBTIFF_4.0‘解决方法

问题描述

在执行make命令编译c++项目的时候,build成功,但是后面出现了下面的报错:

make  
                                                                                                                                                                                                
Consolidate compiler generated dependencies of target calibrate
[ 50%] Building CXX object CMakeFiles/calibrate.dir/calibrate.cpp.o
[100%] Linking CXX executable calibrate

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.5.4d: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to `_TIFFmemcpy@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.5.4d: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFClientdata@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to `_TIFFrealloc@LIBTIFF_4.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeotiff.so.5: undefined reference to `_TIFFmemset@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFLastDirectory@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadRGBAStripExt@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.5.4d: undefined reference to `TIFFWriteEncodedStrip@LIBTIFF_4.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.5.4d: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFIsByteSwapped@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFFlushData@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadFromUserBuffer@LIBTIFF_4.0&

你可能感兴趣的:(ubuntu,c++)