Ask Your Question
0

Linking problem when building apriltag_ros package

asked 2019-06-01 17:44:12 -0500

dasanche gravatar image

Hello,

I'm trying to build this project ( http://wiki.ros.org/apriltag_ros ) in Ubuntu 18.04 and ROS-melodic.

I just did:

(i) cd catkin_ws/src/

(ii) git clone https://github.com/AprilRobotics/apri...

(iii) cd catkin_ws/ & catkin_make

I'm getting a linking problem against a very basic ROS library:

[ 96%] Linking CXX executable /home/das/catkin_ws/devel/lib/apriltag_ros/apriltag_ros_single_image_client_node
CMakeFiles/apriltag_ros_single_image_client_node.dir/src/apriltag_ros_single_image_client_node.cpp.o: In function `main':
apriltag_ros_single_image_client_node.cpp:(.text.startup+0x101): undefined reference to `ros::NodeHandle::NodeHandle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__debug::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)'
apriltag_ros_single_image_client_node.cpp:(.text.startup+0x1b0): undefined reference to `ros::NodeHandle::NodeHandle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__debug::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)'
collect2: error: ld returned 1 exit status

Any idea why?

edit retag flag offensive close merge delete

Comments

Please don't crosspost. It wastes the effort of people on both sites.

jayess gravatar imagejayess ( 2019-06-01 19:07:37 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-03 14:46:52 -0500

dasanche gravatar image

Solved by removing the .catkin_tools, .private, build, devel, logs directories in the root of the workspace manually. Initializing again (catkin config --init )

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

2 followers

Stats

Asked: 2019-06-01 17:44:12 -0500

Seen: 46 times

Last updated: Jun 03