ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question

Revision history [back]

There are a bunch of problems with your code. The problem you are referring to is probably caused by missing cpp files in your target in CMakeLists.txt. The linker just cannot find the implementation of odom_node's constructor.

I guess you are trying to implement the method addOdomNode in class stage_listener. However, you are creating a function in the global namespace (you need to write stage_listener::addOdomNode in your cpp file). And you shouldn't put several classes in one header file. Instead, create one .h and one .cpp file per class.

I would also not suggest to implement linked lists manually. The C++ STL already provides many container classes, including doubly-linked lists and vectors.