Page 1 of 1

What's wrong with SetupResources()?

Posted: Sun Jan 30, 2005 6:05 pm
by DaCracker
Hi!

I just ran into a problem then I should compile my first OGRE project..
Then I use the SetupResources() (no errors/warnings in the code) the program crashes at runtime, and if I delete it it works... why?
Is this a bug?
:(

Posted: Sun Jan 30, 2005 6:59 pm
by Lodes
Hi,

Nothing is wrong with setupResources. Maybe if you told us what exception OGRE gave you or if none gave us a log of Ogre.log we may be able to help you.

My best guest, since you said it was your first project, is that you don't have resources.cfg in the same folder as your exe.

Posted: Sun Jan 30, 2005 7:39 pm
by DaCracker
OGRE doesn't give me any exception, it's my OS (win2k) that generates a "unkonwn software exception".

The resources.cfg file is in the same dir as the exe.....

Posted: Mon Jan 31, 2005 1:35 am
by sinbad
You really should be running in debug mode, then you might have a chance of knowing what it was that was wrong. setupResources works perfectly fine in all the demos, so it must be something in your project but we're not psychic - you have to delve a little deeper yourself.

Posted: Mon Jan 31, 2005 6:43 pm
by DaCracker
I can't run my program in debug mode because my program can't find the .cfg files in debug mode......
(I use Visual Studio .NET 2003)
:(

Posted: Mon Jan 31, 2005 6:53 pm
by sinbad
Then you haven't got your paths set up correctly.

In the 'Debugging' section of your project properties, you have to set the 'Command' and 'Working Directory' to the place where all the debug binaries and .cfg files are, in the ogre samples this is already set up for you. 'Command' needs to point at the exe, 'Working Directory' at the folder.

I can't help but observe that you don't really know how to use your C++ tools yet. You really should familiarise yourself with the process of compiling, debugging, using MSVC etc before you tackle Ogre, and especially before you start your own separate project using it. Start with a sample and work up from there. C++ is not particularly simple, and Ogre is not a particularly simple C++ project. So you really will need to get up to speed & comfortable with your tools, especially before crying 'Bug!' ;)

Posted: Mon Jan 31, 2005 7:19 pm
by DaCracker
Thx alot Sinbad, the debug mode works now! (I'm pretty new to VS)
The problem was that OGRE doesn't accept my .bsp file (created with Quake3Radiant). I should maybe use an other tool,wich tools do you recommend for creating .bsp files?

I will do my homework before crying out "bug!" again, sorry!
:oops:

Posted: Mon Jan 31, 2005 7:38 pm
by haffax
Use Q3Map2, this tool creates compatible BSPs. Save your map in Radiant as Q3-Map, not HL-Map, but I guess you do so anyway.

Posted: Tue Feb 01, 2005 2:22 pm
by snide
sinbad wrote:You really should be running in debug mode, then you might have a chance of knowing what it was that was wrong.
Just a question, how can we activate the Debug mode when compiling w/ mingw ?

Posted: Tue Feb 01, 2005 8:30 pm
by DaCracker
You can at least use the debug mode if you use Dev-C++ (that uses MingW) :)
(http://www.bloodshed.net/dev/devcpp.html)