Include Obj-C++ header from C++ source file
- by Schwitzgabel
Consider the followng situation:
MacFont.h
struct MacFont : Font
{
// ...
NSFont* font;
};
MacFont will be implemented in MacFont.mm
FontEngine.cpp:
#if defined(OS_MAC)
#include "MacFont.h"
#elif
// ...
#endif
//...
In order to make it compiling, I should rename FontEngine.cpp to FontEngine.mm but I'm not allowed to.
So what now?