Help setting up application

Problems building or running the engine, queries about how to use features etc.
Post Reply
WWJD
Gnoblar
Posts: 10
Joined: Tue Aug 04, 2015 2:17 am

Help setting up application

Post by WWJD » Wed Feb 14, 2018 3:40 am

Hello,

I have been coding for a quite while now, and I have begun creating a game engine using ogre. I decided to start by using the tutorial for Ogre 1.9. Here is the issue:

I've installed Ogre 1.9 SDK, I have created the visual studio project, and I have loaded up the tutorial code, only renaming a few things as to integrate it with the rest of my code. Other than name changes, I have not changed any of the code for the tutorial framework. I can compile the code without errors, however when I run it, nothing happens. I added my game engines logs into the functions and see that I am crashing in the "setupResources" portion of the Ogre code. I ran the debugger and found that it happens in this for loop:

Code: Select all

for (i = settings->begin(); i != settings->end(); ++i)
		{
			typeName = i->first;
			archName = i->second;

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
			// OS X does not set the working directory relative to the app.
			// In order to make things portable on OS X we need to provide
			// the loading with it's own bundle path location.
			if (!Ogre::StringUtil::startsWith(archName, "/", false)) // only adjust relative directories
				archName = Ogre::String(Ogre::macBundlePath() + "/" + archName);
#endif

			Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
				archName, typeName, secName);
		}
I'm not really sure what's going on, and why the tutorial framework isn't working for me. If anyone could help I'd appreciate it. Sorry if I'm not giving you enough information, I'm new to this engine and am unsure all the inner workings of it right now.

Thanks,
WWJD
0 x

User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
Contact:

Re: Help setting up application

Post by tod » Wed Feb 14, 2018 4:25 pm

There are some config files where the executable is. You are probably missing them
0 x

WWJD
Gnoblar
Posts: 10
Joined: Tue Aug 04, 2015 2:17 am

Re: Help setting up application

Post by WWJD » Wed Feb 14, 2018 5:06 pm

Hey, thanks for the reply,

I do have the plugin.cfg and the resource.cfg already in the location of the exe and other dlls. Are there any others that I need other than those two?

WWJD
0 x

User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
Contact:

Re: Help setting up application

Post by tod » Sat Feb 17, 2018 9:28 am

These may be enough, just make sure resources.cfg contains all the resources you need, and in the correct group. The Ogre log may display the actual resource that fails.
0 x

palsofchaos
Gnoblar
Posts: 7
Joined: Wed Feb 21, 2018 4:38 pm
x 1

Re: Help setting up application

Post by palsofchaos » Wed Feb 21, 2018 4:49 pm

I also had this issue.

Your resource.cfg file is filled with paths to many files within the Ogre SDK you downloaded. Some of these paths may be missing or incomplete. Your exception message may display what file is 'missing'. The resource.cfg needs a relative path that drills down to the exact directory the 'missing' file resides in.

If your unfamiliar with using visual studio, try building 'release' rather than 'debug'. This was another thing that tripped me up after I finished the setup tutorial.
0 x

WWJD
Gnoblar
Posts: 10
Joined: Tue Aug 04, 2015 2:17 am

Re: Help setting up application

Post by WWJD » Sat Mar 17, 2018 3:12 am

Thanks guys,

I got it to work. glad there are friendly people here to help.

WWJD
0 x

Post Reply