Dynamic loader and virtual functions

Chris Hennes chennes@sukrahelitek.com
Sat Aug 17 05:28:00 GMT 2002


I have a C++ application that loads plugins using dlopen and dlsym. To 
do this, each plugin has an extern "C" function called LoadPlugin. Up 
until now, this has worked fine. Now, I am developing a new plugin. The 
first few tests worked fine - dlsym found LoadPlugin without any 
trouble. I then added a new class to the plugin - it is derived from a 
class that is defined in the main application, which has numerous 
virtual functions. If I don't override those functions in the new class, 
everything works fine (as far as loading is concerned), but all I have 
to do is uncomment one in the header file, and suddenly dlsym no longer 
finds LoadPlugin. Any clues?

If there is different mailing list that this should be posted on, please 
  let me know.

Thanks,

Chris Hennes



More information about the Gcc-help mailing list