makeコンパイル時libopencv_highgui.so:undefined reference to `TIFFIsTiled@LIBTIFF_4.0'

1009 ワード

OpenCVにはlibtiff 4ライブラリが必要ですが、Ubuntu 14.04システムのインストールはlibtiff 4を持たないので、OpenCVをインタフェースとする場合
コンパイル中にlibopencvが表示される可能性があります.highgui.so:undefined reference to `TIFFIsTiled@LIBTIFF_4.0'等
Bug:
/usr/lib/libopencv_highgui.so.2.4: undefined reference to TIFFRGBAImageOK@LIBTIFF_4.0' 1> 
/usr/lib/libopencv_highgui.so.2.4: undefined reference toTIFFReadRGBAStrip@LIBTIFF_4.0'

解決方法:cmakeコンパイルOpenCV時:cmake-D BUILD_TIFF=ON
libtiff 4が自動的にコンパイルされ、OpenCVでインタフェースコンパイルされるとBugが消去されます!