I'm trying to set up a Ogre3D v1.8.1 with Code Blocks 12.11 which has GCC 4.7.0 configured in it. I downloaded the pre compiled version of Ogre3D for MinGW, start up example compiles and executes program without error, but during the initialization of Ogre3D(driver selection screen) some errors occurs and apps freezes. Deliberate search on net revealed that there are so many post on internet where many people has stuck on that stage of program that couldn't pass.
我正在尝试用代码块12.11设置一个Ogre3D v1.8.1,其中配置了GCC 4.7.0。我下载了Ogre3D的预编译版本的MinGW,启动示例编译并无错误执行程序,但是在Ogre3D(驱动选择屏幕)的初始化过程中出现了一些错误,应用程序冻结了。网上搜索结果显示,互联网上有这么多的帖子,很多人都被困在那个无法通过的程序阶段。
C::B compiler report after Ogre3D scrren crashes
C: B编译器报告Ogre3D scrren崩溃后。
In __cxa_throw () (D:\Ogre3D_181\OgreSDK_MinGW_v1-8-1\bin\Debug\OgreMain_d.dll)
87 ..\..\..\..\..\OgreMain\src\OgreConfigFile.cpp: No such file or directory.
#1 0x009507e9 in Ogre::ConfigFile::loadDirect (this=0x28fc48, filename=...,
separators=..., trimWhitespace=true) at ..\..\..\..\OgreMain\src\OgreConfigFile.cpp:87
Debugger finished with status 0
Ogre3D.log report is as shown below
Ogre3D。日志报告如下所示。
13:19:34: MovableObjectFactory for type 'BillboardSet' registered.
13:19:34: MovableObjectFactory for type 'ManualObject' registered.
13:19:34: MovableObjectFactory for type 'BillboardChain' registered.
13:19:34: MovableObjectFactory for type 'RibbonTrail' registered.
13:19:34: OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in
ConfigFile::load at ..\..\..\..\..\OgreMain\src\OgreConfigFile.cpp (line 88)
Based on the complaints produced by Ogre3D and C::B, It may seem that I'm not passing the correct include/source/lib directories and external dependencies correctly but actually I've followed instructions from official Ogre3D site and I'm sure that this is correct because otherwise compiler should have thrown the exception during the compilation. Along with that other users also experienced such kind of problems even though they configure the enviroment properly.
基于Ogre3D产生的投诉和C::B,似乎我不传递正确的包括源/ lib /目录和外部依赖正确但实际上我跟随指令从Ogre3D官方网站,我相信这是正确的,否则编译器在编译应该抛出异常。与此同时,其他用户也经历了这样的问题,即使他们正确地配置了环境。
Another Error
另一个错误
07:09:37: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program
Ogre/DualQuaternionHardwareSkinningTwoWeightsTwoPhaseCg: The compile returned an
error.DualQuaternion_Common.cg(167) : warning C7019: "blendWgt" is too large for
semantic
"BLENDWEIGHT", which is size 1
(0) : error C6007: Constant register limit exceeded; more than 96 constant registers
needed to compiled program
(0) : error C6007: Constant register limit exceeded; more than 96 constant registers
needed to compiled program
(0) : error C6007: Constant register limit exceeded; more than 96 constant registers
needed to compiled program
in CgProgram::compileMicrocode at
..\..\..\..\..\..\PlugIns\CgProgramManager\src\OgreCgProgramManagerDll.cpp (line 67)
Your guidance will be appreicated,
您的指导将会非常感谢,
2 个解决方案
#1
2
The exception is not complaining about source directories or external dependencies. It's complaining about missing plugins.cfg
file. The most relevant line in the log is this:
异常并不是抱怨源目录或外部依赖关系。它在抱怨丢失的插件。cfg文件。日志中最相关的一行是:
OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in...
怪物异常(6:FileNotFoundException):“插件。cfg文件未找到!在…
The location of that file is passed to the constructor of Root. The demos probably use the root of working directory. Make sure that the working directory is set correctly and the file is in that path.
该文件的位置传递给根的构造函数。演示可能使用工作目录的根。确保工作目录设置正确,文件在该路径中。
See this guide Setting Up An Application - CodeBlocks
请参阅此指南来设置一个应用程序- CodeBlocks。
If you want to run your executable from within Code::Blocks, you need to set up 'working directory' and 'command' in the project settings like this: (see the image from that page)
如果您想从代码中运行您的可执行文件::块,您需要在项目设置中设置“工作目录”和“命令”:(查看该页面的图像)
You can find more basic info about initialization and what plugins.cfg is in this tutorial
你可以找到更多关于初始化和插件的基本信息。cfg在本教程中。
#2
2
Regarding your second error:
关于你的第二个错误:
As the message clearly states, your Cg program tries to use more registers than are available on your machine. This depends on the graphics cards (which one are you using)?
由于消息清楚地表明,您的Cg程序试图使用比您的机器上可用的寄存器更多的寄存器。这取决于图形卡(你使用的是哪个)?
Depending on what you are trying to achieve, you might have to adjust the shaders a bit so that they stay within in the supported bounds of your hardware.
根据您想要实现的目标,您可能需要对着色器进行一些调整,以便它们能够在您的硬件支持的范围内。
See for example this Ogre3D forums thread where something similar happened with the DualQuaternion shader and the user just reduced the bone count. On ATI cards, usually only 24 bones are supported in that shader.
例如,这个Ogre3D论坛的线程在DualQuaternion着色器中发生了类似的事情,而用户只是减少了骨骼的数量。在ATI卡片上,通常只有24个骨头被支持。
On important note: Many issues in that area have been fixed with Ogre v1.9, so I would advise you to update if possible. v1.9 has been stable since quite some time (in fact we are already preparing the next release v.1.0).
重要提示:该领域的许多问题都是用Ogre v1.9解决的,所以我建议您尽可能更新。v1.9已经很稳定了(事实上,我们已经在准备下一个版本1.0)。
#1
2
The exception is not complaining about source directories or external dependencies. It's complaining about missing plugins.cfg
file. The most relevant line in the log is this:
异常并不是抱怨源目录或外部依赖关系。它在抱怨丢失的插件。cfg文件。日志中最相关的一行是:
OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in...
怪物异常(6:FileNotFoundException):“插件。cfg文件未找到!在…
The location of that file is passed to the constructor of Root. The demos probably use the root of working directory. Make sure that the working directory is set correctly and the file is in that path.
该文件的位置传递给根的构造函数。演示可能使用工作目录的根。确保工作目录设置正确,文件在该路径中。
See this guide Setting Up An Application - CodeBlocks
请参阅此指南来设置一个应用程序- CodeBlocks。
If you want to run your executable from within Code::Blocks, you need to set up 'working directory' and 'command' in the project settings like this: (see the image from that page)
如果您想从代码中运行您的可执行文件::块,您需要在项目设置中设置“工作目录”和“命令”:(查看该页面的图像)
You can find more basic info about initialization and what plugins.cfg is in this tutorial
你可以找到更多关于初始化和插件的基本信息。cfg在本教程中。
#2
2
Regarding your second error:
关于你的第二个错误:
As the message clearly states, your Cg program tries to use more registers than are available on your machine. This depends on the graphics cards (which one are you using)?
由于消息清楚地表明,您的Cg程序试图使用比您的机器上可用的寄存器更多的寄存器。这取决于图形卡(你使用的是哪个)?
Depending on what you are trying to achieve, you might have to adjust the shaders a bit so that they stay within in the supported bounds of your hardware.
根据您想要实现的目标,您可能需要对着色器进行一些调整,以便它们能够在您的硬件支持的范围内。
See for example this Ogre3D forums thread where something similar happened with the DualQuaternion shader and the user just reduced the bone count. On ATI cards, usually only 24 bones are supported in that shader.
例如,这个Ogre3D论坛的线程在DualQuaternion着色器中发生了类似的事情,而用户只是减少了骨骼的数量。在ATI卡片上,通常只有24个骨头被支持。
On important note: Many issues in that area have been fixed with Ogre v1.9, so I would advise you to update if possible. v1.9 has been stable since quite some time (in fact we are already preparing the next release v.1.0).
重要提示:该领域的许多问题都是用Ogre v1.9解决的,所以我建议您尽可能更新。v1.9已经很稳定了(事实上,我们已经在准备下一个版本1.0)。