本文介绍了ROS的libtiff4错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu 16.04下尝试使用catkin从一位朋友那里编译ROS软件包,并收到以下错误消息:

I am trying to compile a ROS-package from a friend with catkin under Ubuntu 14.04 and am getting the following error:

/usr/bin/ld: warning: libboost_system.so.1.49.0, needed by
//usr/local/MATLAB/R2014a/bin/glnxa64/libut.so, may conflict with libboost_system.so.1.54.0
//usr/local/lib/libcvd.so: undefined reference to `TIFFWriteEncodedStrip@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFReadRGBAImageOriented@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFGetFieldDefaulted@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFStripSize@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFSetField@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined reference to `FT_Face_GetCharVariantIndex'
//usr/local/lib/libcvd.so: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
//usr/local/lib/libcvd.so: undefined reference to `TIFFReadScanline@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined reference to `FT_Get_Advance'
collect2: error: ld returned 1 exit status

我已经安装了libcvd,还安装了libtiff4-dev.有没有人知道如何解决该问题?

I have libcvd installed and also libtiff4-dev. Has anybody any idea, how to solve that issue?

非常感谢

作为建议,我包括CMakeLists.txt:

As suggest I include the CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(test)
set (test_VERSION "0.0.1")


find_package(OpenCV REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  test_core
  cv_bridge
  image_transport
  roscpp
)

find_package(tracker)

set (CMAKE_CXX_FLAGS "-DNDEBUG -DNTIMING -DNRUN_UNIT_TESTS -g -O0 -std=c++11")

catkin_package(
  INCLUDE_DIRS include
)


include_directories (include
  ${CMAKE_CURRENT_SOURCE_DIR}/include
  ${tracker_INCLUDE_DIRS}
  ${TRIANGULATION_INCLUDE_DIRS}
  ${OPENCV_INCLUDE_DIRS}
)

include_directories(/usr/local/MATLAB/R2014a/extern/include)

include_directories (SYSTEM
  ${catkin_INCLUDE_DIRS}
)

set (SOURCE
  src/test/main.cc
  src/test/rosbridge.cc
  src/test/core.cc
)

add_executable (test ${SOURCE})

target_link_libraries(test
  /lib/x86_64-linux-gnu/libssl.so.1.0.0
  /lib/x86_64-linux-gnu/libcrypt.so.1
  /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
  /usr/local/MATLAB/R2014a/bin/glnxa64/libmx.so
  /usr/local/MATLAB/R2014a/bin/glnxa64/libeng.so
  /usr/local/MATLAB/R2014a/bin/glnxa64/libmat.so
  /usr/local/MATLAB/R2014a/bin/glnxa64/libut.so
  ${OpenCV_LIBS}
  ${tracker_LIBRARIES}
  cvd
  ${catkin_LIBRARIES}
  ${TRIANGULATION_LIBRARIES}
)

推荐答案

我已修复它!

您必须像这样在lib文件夹中链接libtiff lib:

You have to link against the libtiff lib in your lib folder like this:

target_link_libraries(test
  .
  .
  .
  /usr/lib/x86_64-linux-gnu/libtiff.so.5
  .
  .
  .
)

这篇关于ROS的libtiff4错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:14