Ask Your Question
0

Unable to build own node - libboost error

asked 2020-05-16 12:13:22 -0500

Fredzibob gravatar image

When I try to build my package I get an error: /usr/bin/ld: CMakeFiles/simple_navigation_goals.dir/src/simple_navigation_goals.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv' /usr/lib/x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line

I googled and found out its missing the libboost library. But I've checked, and it is indeed in the location mention on the last line of the errorcode. Some suggestions mentions to add "-lboost_system" in my cmakelist. But I dont have the "set(LIBS)" part...

A solution and/or suggestion/clarification would be very helpful! Im using Ubuntu 16.4 and ROS kinetic

Here is my CMakelist: https://pastebin.com/JmVdrm4V

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-21 03:39:55 -0500

Fredzibob gravatar image

I figured it out! - Cant remember the source though...

Firstly I used: catkin_create_pkg "your_package_name" move_base_msgs actionlib roscpp (these are just the libs I used) instead of: roscreate-pkg "your_package_name" move_base_msgs actionlib roscpp. This game me a whole different looking CMakelist.txt.

Then, in the CMakelist.txt right below:

cmake_minimum_required(VERSION 3.0.2)
project(simple_navigation_goals)

I added:

add_executable("name of your executable" src/"name of your cpp".cpp )
target_link_libraries("name of your executable" ${catkin_LIBRARIES})

And then used: catkin_make at the root of the catkin_ws workspace, instead of make inside the new package workspace.

I hope it might help some of you out!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-16 12:13:22 -0500

Seen: 11 times

Last updated: May 21