Implementing A Plugin System in C or C++ [closed]

In C (and I think C++ too although I haven’t done it myself), this is most typically done using dynamically loaded modules. The API:s for such are platform-dependent.

On POSIX (Linux), you use the dlopen() family of functions. Basically you build your plugin separately, then load it at run-time, look up its symbols by name, and can then call them.

For Win32, there is LoadLibrary() which does something very similar, you build your code into a DLL.

For a handy wrapper that makes all of these easy and transparent, check out GLib’s GModule API.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)