Dynamic libraries

In order to load dynamic libraries like .dll or .so, you can use the DynLibManager module. It has two main methods:

Once the library is loaded you can use the DynLib object and its DynLib::getSymbol() method to retrieve a function pointer within the dynamic library, and call into it.

// Load library
DynLib* myLibrary = DynLibManager::instance().load("myPlugin");
// Retrieve function pointer (symbol) to the "loadPlugin" method
typedef void* (*LoadPluginFunc)();
LoadPluginFunc loadPluginFunc = (LoadPluginFunc)myLibrary->getSymbol("loadPlugin");
// Call the function
// Assuming we're done, unload the plugin