Original Post
Hi folks, I'll keep this short: I've got an application that used plugins, and would like some sort of 'DLLMain'-like function in each dynamic library that initialises everything the plugin needs initialised - registering for messages, registering with factories and so on. There's a plugin manager that loads all dynamic libraries, which is the logical place for this initialise method to be called. The problem I'm having is that this method has to be extern "C"'ed, and this won't work with classes and the like - I haven't tried it out yet, but I've read and been told that using classes across dynamic boundaries is risky, if not impossible. What would you chaps suggest? Any thoughts will be much appreciated. Thanks very much :)