-
Notifications
You must be signed in to change notification settings - Fork 420
Description
When I tried to build the project with catkin build, it returns error like this:
/usr/bin/ld: CMakeFiles/ros_package_template.dir/src/RosPackageTemplate.cpp.o: undefined reference to symbol '_ZTVN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3'
/usr/bin/ld: /lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
After I searched the Internet, I found that it is probably because cmake didn't use the right compiler. See this https://stackoverflow.com/questions/59536040/libstdc-so-6-error-adding-symbols-dso-missing-from-command-line
I think it might need to add a line like this in the CMakeLists.txt
set(CMAKE_CXX_COMPILER "/path/to/g++")
or simply modify the project line to
project(ros_package_template CXX)