Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-Platform C++ Dynamic Library Plugin Loader

I was just wondering what my options were for cross-platform implementations for the dynamic loading of plugins using shared libraries. So far the only one that I have found is:

  • http://library.gnome.org/devel/glib/stable/glib-Dynamic-Loading-of-Modules.html

And I was just wondering if I had other options? Essentially, I want to be able to put plugins in shared object files, and load them at runtime and I wanted to do it in a cross-platform C++ way.

Edit: I found this Dr Dobbs Post from 2007; surely somebody has come up with something more since then.

like image 903
Robert Massaioli Avatar asked Oct 19 '10 22:10

Robert Massaioli


1 Answers

You could look into Boost Extension, though it has not yet been accepted into Boost.

The Boost.Extension library has been developed to ease the development of plugins and similar extensions to software using shared libraries. Classes, functions and data can be made available from shared libraries and loaded by the application.

like image 132
Sam Miller Avatar answered Sep 17 '22 18:09

Sam Miller