在orge提供的**ExampleApplication.h**文件中 if (!setup())处:
0x77B0AF68 (msvcr90.dll) (Project1.exe 中)处有未经处理的异常: 0xC0000005: 读取位置 0x6766632E 时发生访问冲突。
查看堆栈:
下面的框架可能不正确和/或缺失,没有为 OgreMain.dll 加载符号
具体位置为:
mRoot = OGRE_NEW Root(pluginsPath, mConfigPath + "ogre.cfg", mResourcePath + "Ogre.log");
setup()函数如下:
virtual bool setup(void)
{
String pluginsPath;
// only use plugins.cfg if not static
#ifndef OGRE_STATIC_LIB
#if OGRE_DEBUG_MODE
pluginsPath = mResourcePath + "plugins_d.cfg";
#else
pluginsPath = mResourcePath + "plugins.cfg";
#endif
#endif
mRoot = OGRE_NEW Root(pluginsPath,
mConfigPath + "ogre.cfg",
mResourcePath + "Ogre.log");
mOverlaySystem = OGRE_NEW OverlaySystem();
#ifdef OGRE_STATIC_LIB
mStaticPluginLoader.load();
#endif
setupResources();
bool carryOn = configure();
if (!carryOn)
return false;
chooseSceneManager();
createCamera();
createViewports();
#ifdef INCLUDE_RTSHADER_SYSTEM
// Initialize shader generator.
carryOn = initializeShaderGenerator(mSceneMgr);
if (!carryOn)
return false;
#endif
// Set default mipmap level (NB some APIs ignore this)
TextureManager::getSingleton().setDefaultNumMipmaps(5);
// Create any resource listeners (for loading screens)
createResourceListener();
// Load resources
loadResources();
// Create the scene
createScene();
createFrameListener();
return true;
}
第一次补充:
经断点调试发现没有执行Root的构造函数就已经异常