OGRE EXCEPTION(6:FileNotFoundException): 'ogre.cfg' file not found

636 views Asked by At

This question is related to the Ogre3D project version 2.1.

Basically I'm building a game based on the code from EmptyProject in the Samples folder. I've also tried the code from Tutorial01_Initialization. I'm getting an error that ogre.cfg can't be found, which is partly correct because it really doesn't exist, but if it doesn't exist the dialog is supposed to pop up so it can be created. I am getting another error in a dialog error box that pops up saying (translated from Swedish since that's my OS language, sorry) "OGRE EXCEPTION(1813): Can't find the given resource type in the memory imaging file in ConfigDialog::display".

I'm building on Windows using the "Visual Studio 15 2017 Win64" generator. Ogre3D is statically built and linked.

Here's the text in Ogre.log:

-- Other stuff with no errors --
05:31:24: *-*-* OGRE Initialising
05:31:24: *-*-* Version 2.1.0unstable ('B')
05:31:24: OGRE EXCEPTION(6:FileNotFoundException): 'ogre.cfg' file not found! in ConfigFile::load at F:\Projects\GameBuild\Libs\Windows\src\Ogre3D\OgreMain\src\OgreConfigFile.cpp (line 88)
05:31:24: WARNING: GraphicsSystem::deinitialize() not called!!!

I think I've seen someone say somewhere that this might be an issue related to the libraries linked into the project and not Ogre3D or the sources themselves, but I seriously doubt it. I also kinda doubt that the source code of the project is wrong since I've tried two different projects from the Ogre3D sources and both get the same error messages in, as far as I can tell, places that aren't related to the Common files. There is a change there's a cmake issue here, something I'm missing when using the Visual Studio generator perhaps?

If you want to look at my source code just copy the Common sources and the EmptyProject sources into some directory and build it, commenting out any references to MainEntryPoints::createSystems and MainEntryPoints::destroySystems (you're supposed to create them yourself but as far as I can tell you can just comment them out to get the build to succeed at this stage).

1

There are 1 answers

1
arrowd On

Use debugger to find out what path is passed to void ConfigFile::loadDirect(const String& filename, const String& separators, bool trimWhitespace) and then check that path if it does contain the config file.