I'm currently designing a plugin system for a game engine. I want all modules (Graphics, Physics, Etc.) to be in seperate dynamically linked libraries. I would like to be able to use the classes in the plugin inside the engine that loads the plugins. I would also like the plugins' classes to be able to derive (and use) classes from the engine.
I think MS VC++2005 can do something like this with __declspec(dllimport) and __declspec(dllexport), but I'm looking for something that is portable. If such a thing does not exist, is there a way to use some trick (like using a macro) so that only the macro has to be changed when porting the code to another platform?