Loads a dynamic library.
This method tries to load the library pointed to by the specified path.
If the given path is absolute, this method tries to load the library pointed to by the specified path. If loading fails, it tries another time appending the extension for shared libraries (e.g.,
.so on Linux,
.dylib on Mac) to the path. If also this attempt fails, this method tries appending the extension for module libraries (e.g.,
.so on Linux and Mac). If all attempts fail, the method raises an exception.
If the given path is relative, this method forms absolute paths prepending the given path with the directories of the default loading path (e.g., /usr/lib/argos3), the contents of ARGOS_PLUGIN_PATH, and the current working directory. For each absolute path so formed, the method attempts to load the library in the same way as described above (e.g., appending the extension of shared/module libraries if needed).
|str_lib||The path of the dynamic library to load |
- A handle to the loaded dynamic library
Definition at line 66 of file dynamic_loading.cpp.