Closed jinchenglee closed 3 years ago
Hi @jinchenglee, Though we are a little late to respond, we encourage such user-specific issues to be raised on the Knowledge hub, so that our experienced mentors can chime in and new students can also learn from the discussion thread. Thank you
I'm using Ubuntu 16.04 LTS. Native ROS kinetic install.
gcc4.9 doesn't work for the project build, catkin_make will complain:
[ 92%] Linking CXX executable /work/git_repo/CarND-Capstone/ros/devel/lib/waypoint_follower/pure_pursuit CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o: In function, std::allocator<std::pair<std::string const, std::string> > > const&)'
...
void ros::Publisher::publish<geometry_msgs::TwistStamped_<std::allocator<void> > >(geometry_msgs::TwistStamped_<std::allocator<void> > const&) const': /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference to
ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:108: undefined reference toros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:112: undefined reference to
ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /opt/ros/kinetic/include/ros/publisher.h:112: undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o:/opt/ros/kinetic/include/ros/publisher.h:112: more undefined references toros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' follow CMakeFiles/pure_pursuit.dir/src/pure_pursuit.cpp.o: In function
main': /work/git_repo/CarND-Capstone/ros/src/waypoint_follower/src/pure_pursuit.cpp:41: undefined reference toros::init(int&, char**, std::string const&, unsigned int)' /work/git_repo/CarND-Capstone/ros/src/waypoint_follower/src/pure_pursuit.cpp:43: undefined reference to
ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::lessSwitching to gcc5.4.1, works fine. Got clue from comments here: https://answers.ros.org/question/234322/linker-error-on-ros-kinetic-ubuntu-1604/