Skip to content

A header-only library to handle C++ symbols in a shared library

Notifications You must be signed in to change notification settings

eckter/cpp-symbols

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This is a header-only library that can be used to load C++ functions and methods in a shared library.

It is the result of failed attempts at loading any C++ code at runtime. We had to find another approach because it didn't answer all of our needs, because of templates and other problematic cases. It can still be useful, as it can be used to load any function regardless of name mangling, and with a nice interface.

Public functions are documented in src/cpp-symbols.hh. The main ones are std::function<P> get_function<P>(std::string func_name, std::string filename) and its variations, with P being a function prototype type like void(int).

To run the tests, run tests/run_tests.sh.

Possible improvements:

  • Improving error managements through exceptions
  • Finding a better way to handle classes, for example by using a class

Authors:

About

A header-only library to handle C++ symbols in a shared library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published