This is for future exports. Ogre may just be a statically linked library for now, but if the authors ever decide to support dynamically linked libraries (the so-called shared libraries on some platforms), they will need to write code like:
class #ifdef EXPORTING __declspec(dllexport) #else __declspec(dllimport) #endif Sample_Character [...]
... and this is only for MSVC. Usually they had to make an effort to do this with Sample_Character and all the other classes that they provide through their library. Creating a separate macro, which will be defined later, is much simpler, since it needs to be done in only one place.
source share