今天看别人的源码,出现“OGRE EXCEPTION(6:FileNotFoundException):*resources_d.cfg* file not found! in ConfigFile::load at ..\src\ogreconfigfile.cpp(line 88)。这个错误以前解决过,好久不用,再次出现的时候,以为只要把resources_d.cfg拷贝到自己程序 的当前目录下就行,
结果又出现OGRE EXCEPTION(7:InternalErrorException): ../../media/packs/SdkTrays.zip - error whilst opening archive: Unable to read zip file. in ZipArchive::checkZzipError at ..\..\..\..\OgreMain\src\OgreZip.cpp (line 280),然后我把OGRE目录下的ZIp文件复制过来 还是出问题。
经过分析两种解决思路:一种最简单:打开工程属性-》Configuration Properties->Debugging 中的Working Directory ,然后设置为OGRE SDK中的bin->debug目录。另外一种就是我上面提到复制到当前目录,下,不过需要根据resources_d.cfg中设置的目录,把所有资源都复制进来。