# Revision history [back]

Hey I am sure you have figured out the answer to this, just to make sure that others are able to find the answer easily here is what is causing the issue.

Registering/Exporting a Plugin

In order to allow a class to be dynamically loaded, it must be marked as an exported class. This is done through the special macro PLUGINLIB_EXPORT_CLASS. This macro can be put into any source (.cpp) file that composes the plugin library, but is usually put at the end of the .cpp file for the exported class. For the example above, we might create a class_list.cpp file in package 'example_pkg' that looks as follows and compile it into the librectangle library. In your case your cpp should have something like this at the top

#include <pluginlib/class_list_macros.h>
#include <FrontierPlugins/NearestBasedAllocation.h>

PLUGINLIB_EXPORT_CLASS(FrontierPlugins::NearestBasedAllocation, YourBaseClassNamespace::YourBaseClass)

 2 No.2 Revision jayess 5909 ●24 ●83 ●87

Hey I am sure you have figured out the answer to this, just to make sure that others are able to find the answer easily here is what is causing the issue.

Registering/Exporting a Plugin

In order to allow a class to be dynamically loaded, it must be marked as an exported class. This is done through the special macro PLUGINLIB_EXPORT_CLASS. PLUGINLIB_EXPORT_CLASS. This macro can be put into any source (.cpp) (.cpp) file that composes the plugin library, but is usually put at the end of the .cpp file for the exported class. For the example above, we might create a class_list.cpp class_list.cpp file in package 'example_pkg' example_pkg that looks as follows and compile it into the librectangle librectangle library. In your case your cpp should have something like this at the top

#include <pluginlib/class_list_macros.h>
#include <FrontierPlugins/NearestBasedAllocation.h>

PLUGINLIB_EXPORT_CLASS(FrontierPlugins::NearestBasedAllocation, YourBaseClassNamespace::YourBaseClass)