发生了Ogre SDK异常

时间:2012-06-04 01:59:02

标签: c++ windows user-interface ogre3d

我在我的电脑上设置了Ogre和依赖项,并下载了一些Ogre应用程序。当我启动我刚下载的项目的新exe文件时,会生成以下错误:

05:37:59: Loading library C:/OgreSDK_vc9_v1-7-1/bin/debug\RenderSystem_Direct3D9_d
05:37:59: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library C     :/OgreSDK_vc9_v1-7-1/bin/debug\RenderSystem_Direct3D9_d.  System Error: The specified module  could not be found.

in DynLib::load at ..\..\..\..\OgreMain\src\OgreDynLib.cpp (line 91)

任何帮助将不胜感激。

提前致谢。

2 个答案:

答案 0 :(得分:1)

创建中央Ogre3D类Ogre::Root后,您需要传递包含所有要加载的Ogre插件的* .CFG文件的名称,例如上面提到的D3D9渲染系统。

默认情况下,该文件必须位于* .EXE旁边,并且应该如下所示(以最小形式加载D3D9渲染系统并且匹配的DLL文件位于此CFG文件旁边):

# Defines plugins to load

# Define plugin folder
PluginFolder=.

# Define plugins
Plugin=RenderSystem_Direct3D9

有关详细信息,请查看此section in the Ogre3D tutorial 1

答案 1 :(得分:0)

我花了一段时间才弄明白。因为你没有构建它而错过了dll(RenderSystem_Direct3D9_d) - 它是OGRE.sln中具有相同名称的项目(RenderSystem_Direct3D9)

我正在使用OGRE 2.1,所以我丢失的DLL是RenderSystem_Direct3D11_d.dll而不是像你的RenderSystem_Direct3D9_d.dll,但修复方法类似,只需构建dll的项目,如下图所示。 OgreMain_RenderSystem_Direct3D11

无论如何,作为初学者,为了避免任何麻烦,只需点击F6即可构建整个解决方案。