build package and run it using Catkin_make
Hello, i need some help in building my package using Catkin_make commend line when i have followed the steps in link text. i have questions concerning:
- in src/perser.cpp file in line 10 and 13 do i need to change urdf_file to my created .urdf filename.
- in build your package, and run it step, when i have used the commend line Catkin_make an Error appear said that :
ala@ala-HP-ProBook-4520s:~/catkin_ws/src/testbot_description/urdf$ catkin_make
Base path: /home/ala/catkin_ws/src/testbot_description/urdf
Source space: /home/ala/catkin_ws/src/testbot_description/urdf/src
Build space: /home/ala/catkin_ws/src/testbot_description/urdf/build
Devel space: /home/ala/catkin_ws/src/testbot_description/urdf/devel
Install space: /home/ala/catkin_ws/src/testbot_description/urdf/install
***
***Running command: "make cmake_check_build_system" in "/home/ala/catkin_ws/src/testbot_description/urdf/build"
***Running command: "make -j4 -l4" in "/home/ala/catkin_ws/src/testbot_description/urdf/build"
***
Here start the problem:
**Linking CXX executable parser**
CMakeFiles/parser.dir/src/parser.cpp.o: In function `main':
parser.cpp:(.text+0x53): undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
parser.cpp:(.text+0x7e): undefined reference to `ros::console::g_initialized'
parser.cpp:(.text+0x8d): undefined reference to `ros::console::initialize()'
parser.cpp:(.text+0xe2): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
parser.cpp:(.text+0x120): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
parser.cpp:(.text+0x12c): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'
parser.cpp:(.text+0x17f): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
parser.cpp:(.text+0x1e1): undefined reference to `urdf::Model::initFile(std::string const&)'
parser.cpp:(.text+0x1f3): undefined reference to `ros::console::g_initialized'
parser.cpp:(.text+0x202): undefined reference to `ros::console::initialize()'
parser.cpp:(.text+0x257): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
parser.cpp:(.text+0x295): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
parser.cpp:(.text+0x2a1): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'
parser.cpp:(.text+0x2f4): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
parser.cpp:(.text+0x305): undefined reference to `ros::console::g_initialized'
parser.cpp:(.text+0x314): undefined reference to `ros::console::initialize()'
parser.cpp:(.text+0x369): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
parser.cpp:(.text+0x3a7): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
parser.cpp:(.text+0x3b3): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'
parser.cpp:(.text+0x406): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
collect2: error: ld returned 1 exit status
make[2]: *** [parser] Error 1
make[1]: *** [CMakeFiles/parser.dir/all] Error 2
make: *** [all] Error 2 ...
Next time, please use the preformatted text button for consoel output (the one with 1's and 0's on it).
There seems to be a problem with you
CMakeLists.txt
. Either you are missing thetarget_link_libraries
call or you haven't configured all dependencies correctly. Please EDIT your question