Skip to content

A standalone C++ Dynamic Library Manager, usable for Windows, Linux, and Mac OS.

License

Notifications You must be signed in to change notification settings

polysoft1/DLManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLManager

Purpose

To provide a simple way to dyamically load dynamic libraries across multiple platforms.

Currently tested Platforms

  • Windows:
  • Linux and MacOS:

Adding to your project

DLManager is a header only library, so you only need
#include "DLManager.h".
However, in order to link, you might need a flag for your compiler.

DLManager uses dlopen on Linux, so you would need to pass -ldl to your compiler. If using cmake, you can instruct it to do that with: target_link_libraries(target ${CMAKE_DL_LIBS}) replacing target with your cmake target.

Using DLManager

Each platform may require different workflows in order for DLManager to work properly, especially with name mangling.

For GCC, you can use extern "C" before a non-member function.

extern "C" void hello(){
    std::cout << "Hello!" << std::endl;
}

Then you can access it by passing "hello" as the name to getFunction.
Check out our examples for demonstrations

About

A standalone C++ Dynamic Library Manager, usable for Windows, Linux, and Mac OS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published