在调试模式下使用MFC编译Ogre时出现问题,因为MFC宏而出现错误:
#ifdef _DEBUG #define new DEBUG_NEW
其中基本上是Ogre的调试新手 -
#define OGRE_NEW new (__FILE__, __LINE__, __FUNCTION__)
我正试图让MFC + Ogre在DEBUG模式下一起快乐地运行,然后我用它来编译:
#ifdef _DEBUG #undef new #endif Ogre::Root * root = OGRE_NEW Ogre::Root( pluginsFile, "ogre.cfg", "Ogre.log" ); #ifdef _DEBUG #define new DEBUG_NEW #endif
但是现在,我收到一个运行时错误:Ogre :: InternalErrorException
还有其他人面对/解决这个问题吗?
答案 0 :(得分:0)
您可能需要删除MFC调试宏而不是Ogre调试宏。在这里标题为Common Mistakes Ogre Wiki
的Ogre Wiki上查看这篇文章答案 1 :(得分:0)
我认为这可能是我使用的特定机器中的一个问题。我在另一台机器上尝试了这个,它似乎在调试模式下使用#ifdefs #undefs,如上所示。