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

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
Seranth
Gnoblar
Posts: 15
Joined: Mon Jul 11, 2016 1:50 am
x 1

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

Post by Seranth »

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:

Code: Select all

-- 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.

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). I'm still in the early stages of development so I'm still working on building the game for several platforms before I make any original game code, currently just my CMake code is about 6000 lines of code and I'm only almost done with Windows and Android. :D

I've tried everything I can think of at the moment and I'd rather get started on adding Linux than to sit and get to the bottom of this problem, so I figured I'd waste someone elses time instead so I can go and do more fun stuff while waiting for an answer. :D Seriously though, it'd save me a huge headache, help is deeply appreciated.
Hrenli
Halfling
Posts: 73
Joined: Tue Jun 14, 2016 12:26 pm
x 19

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

Post by Hrenli »

Have not used EmptyProject myself, but first look shows me the only usage of ConfigFile there:

Code: Select all

            Ogre::ConfigFile cf;
            cf.load(mResourcePath + "resources2.cfg");
So, are you sure the problem is in missing ogre.cfg? Or it's resources2.cfg which is vital and missing?
User avatar
blitzcoder
Halfling
Posts: 99
Joined: Wed Oct 09, 2019 4:06 am
x 18
Contact:

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

Post by blitzcoder »

Anything related to Ogre samples, templates or exampleframework is very likely to be a similar case and solution here:

viewtopic.php?p=554886

Just add OgreWin32Resource.rc in your Resource Files since Win32Resource covers ConfigDialog::Display and if you're not setting up a static build app manually.

New Blitz3D/BlitzBasic/BlitzMax Home - https://blitzcoder.org
Post Reply