Function mrpt::system::loadPluginModule
Defined in File os.h
Function Documentation
-
bool mrpt::system::loadPluginModule(const std::string &moduleFileName, mrpt::optional_ref<std::string> outErrorMsgs = std::nullopt)
Loads a dynamically-linked “plug-in” module (Windows: .dll, GNU/Linux: .so). Useful to register
mrpt-rtti-based classes defined in external user code.- Parameters:
moduleFileName – [in] Absolute or relative path to the module file.
outErrorMsgs – [inout] If provided, error messages will be saved here. If not, errors will be dumped to std::cerr.
- Returns:
true If modules could be loaded without errors. Upon mrpt-system library unloading, all loaded modules will be automatically unloaded too. Manual unload is possible with unloadPluginModule().