ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is a basic compiling/linking issue, not really a catkin issue. The problem is that the implementation of "SBGInsIg500N::SBGInsIg500N()" is not being compiled. The prototype of the function (a reference to the actual function) is located in the header file, which lets your node's source compile. But the actual contents of the function, which are probably located in a corresponding cpp file, are not compiled and thus available at link time. The linker cannot find a suitable definition for the referenced constructor, and prints an error.

To make the function's definition available, you have to direct the buildsystem to compile the cpp file where the function is defined, and then link the compiled object file into your executable. You can do this in two ways:

  1. Change your call to add_executable to add the source file where the constructor is defined: add_executable(sbg_ins_ig500n src/node.cpp src/sbg_ins/<sbg_ins_file>.cpp)

  2. Compile your sbg_ins class into a shared or static library, and then link that library to your sbg_ins_500gn executable.