Ask Your Question

LIBTIFF_4.0 link errors

asked 2014-06-24 14:30:08 -0500

funWithImages gravatar image

I build opencv-2.4.9 successfully (it seemed) on Linux x86_64. When I then build an application that used highgui I get the following errors.

Can you tell me why I am getting this and how to fix it? I have pointing to> in /usr/local/lib.

1> /usr/lib/ undefined reference to TIFFIsTiled@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFOpen@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFReadEncodedStrip@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFSetField@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFWriteScanline@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFGetField@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFScanlineSize@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFSetWarningHandler@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFReadEncodedTile@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFReadRGBATile@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFClose@LIBTIFF_4.0' 1> /usr/lib/ undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0' 1> /usr/lib/ undefined reference toTIFFReadRGBAStrip@LIBTIFF_4.0'

edit retag flag offensive close merge delete


Just want to say thank you for showing this. I was compiling opencv with ffmpeg for 2 days until i saw this.

mrdgw123 gravatar imagemrdgw123 ( 2016-03-01 09:12:47 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-03 11:51:39 -0500

Will gravatar image

Unfortunately, OpenCV currently needs libtiff4, which Ubuntu 14.04 has dropped from their packaging system. As a workaround, specify -DBUILD_TIFF=ON to CMake when configuring OpenCV. This will have OpenCV build the distributed version of libtiff4, and should solve your linker problems.

Hope that helps!

edit flag offensive delete link more



I tried this, re-did cmake with that option (-DBUILD_TIFF=ON) included and the cmake return showed: -- TIFF: build (ver 42 - 4.0.2) however when I tried to run the demo I still got ./facedetect: error while loading shared libraries: cannot open shared object file: No such file or directory

biaspoint gravatar imagebiaspoint ( 2014-12-29 23:00:04 -0500 )edit

I now realize that I had an old PATH after my re-install of 14.04 that I thought was gone and it was linking to an older OpenCV (2.4) folder/file that was within the ROS install. I removed the PATH and also upgraded ROS to OpenCV 3.0. I think either would have worked alone.

sudo apt-get install ros-hydro-opencv3
biaspoint gravatar imagebiaspoint ( 2014-12-30 11:41:27 -0500 )edit

Adding -DBUILD_TIFF=ON worked Thanks a lot

Yash101296 gravatar imageYash101296 ( 2015-06-23 15:40:50 -0500 )edit

Adding -QMAKE_CXXFLAGS += -DBUILDTIFF=ON in qt creator didnt work for me. Any idea why?

Raman gravatar imageRaman ( 2016-06-18 00:42:51 -0500 )edit

Same error on: Ubuntu 16.04, OpenCV 3.2.0. Adding -D WITH_TIFF=ON -D BUILD_TIFF=ON worked for me. Thx!

RodenLuo gravatar imageRodenLuo ( 2017-03-23 23:18:44 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-06-24 14:30:08 -0500

Seen: 13,446 times

Last updated: Nov 03 '14