error adding symbols: DSO missing from command line
Dimplek
Dimplek 835 0
2017-04-18 19:01
近期再做一个软件包的时候编译出现以下问题:

/usr/bin/ld: CMakeFiles/main.dir/src/main.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0: error adding symbols: DSO missing from command line

我的cmakelist文件如下:

cmake_minimum_required(VERSION 2.8.3)
project(turtle_track)


find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  roscpp
  rospy
  std_msgs
)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

find_package(Boost REQUIRED COMPONENTS thread)
find_package(OpenCV)
include_directories(include ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})

add_library(LaneFinder src/LaneFinder.cpp)
add_library(CollissionFinder src/CollissionFinder.cpp)
add_library(ApplyIPM src/ApplyIPM.cpp)
add_library(Movement src/Movement.cpp)


add_executable(main src/main.cpp)
add_dependencies(main ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(main ${OpenCV_LIBRARIES})
target_link_libraries(main LaneFinder)
target_link_libraries(main CollissionFinder)
target_link_libraries(main ApplyIPM)
target_link_libraries(main Movement)
target_link_libraries(main ${Boost_LIBRARIES})
add_executable(IPM src/IPM.cpp)
target_link_libraries(IPM ${OpenCV_LIBRARIES})

catkin_package()
网上查说是没有链接boost,但我按照ros关于cmakelist文件有关的设置,我已经连接了boost库,我不知道接下来该怎么弄,希望有技术大拿帮我解决这个问题,感激不尽!!!!
分享:
游客
要评论请先登录 或者 注册
返回顶部