(function(a,e,f,g,b,c,d){a.GoogleAnalyticsObject=b;a[b]=a[b]||function(){(a[b].q=a[b].q||[]).push(arguments)};a[b].l=1*new Date;c=e.createElement(f);d=e.getElementsByTagName(f)[0];c.async=1;c.src=g;d.parentNode.insertBefore(c,d)})(window,document,"script","https://www.google-analytics.com/analytics.js","ga");ga("create","UA-732153-7","auto",{allowLinker:!0,siteSpeedSampleRate:10});ga("set","transport","beacon");ga("set","anonymizeIp",!0);ga("require","linker"); ga("linker:autoLink","askapache.com askapache.net htaccess.io htaccesselite.com askapache.info htaccess.guru".split(" "),!0);ga("send","pageview"); CLASS="article" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

C++ dlopen mini HOWTO

Aaron Isotton


Revision History
Revision 1.102006-03-16Revised by: AI
Changed the license from the GFDL to the GPL. Fixed usage of dlerror; thanks to Carmelo Piccione. Using a virtual destructor in the example; thanks to Joerg Knobloch. Added Source Code section. Minor fixes.
Revision 1.032003-08-12Revised by: AI
Added reference to the GLib Dynamic Module Loader. Thanks to G. V. Sriraam for the pointer.
Revision 1.022002-12-08Revised by: AI
Added FAQ. Minor changes
Revision 1.012002-06-30Revised by: AI
Updated virtual destructor explanation. Minor changes.
Revision 1.002002-06-19Revised by: AI
Moved copyright and license section to the beginning. Added terms section. Minor changes.
Revision 0.972002-06-19Revised by: JYG
Entered minor grammar and sentence level changes.
Revision 0.962002-06-12Revised by: AI
Added bibliography. Corrected explanation of extern functions and variables.
Revision 0.952002-06-11Revised by: AI
Minor improvements.

How to dynamically load C++ functions and classes using the dlopen API.

Table of Contents
1. Introduction
1.1. Copyright and License
1.2. Disclaimer
1.3. Credits / Contributors
1.4. Feedback
1.5. Terms Used in this Document
2. The Problem
2.1. Name Mangling
2.2. Classes
3. The Solution
3.1. extern "C"
3.2. Loading Functions
3.3. Loading Classes
4. Source Code
5. Frequently Asked Questions
6. See Also