What's wrong with SetupResources()?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

What's wrong with SetupResources()?

Post by DaCracker » Sun Jan 30, 2005 6:05 pm

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?
:(
0 x

Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes » Sun Jan 30, 2005 6:59 pm

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

User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post by DaCracker » Sun Jan 30, 2005 7:39 pm

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

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Mon Jan 31, 2005 1:35 am

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

User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post by DaCracker » Mon Jan 31, 2005 6:43 pm

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)
:(
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Mon Jan 31, 2005 6:53 pm

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!' ;)
0 x

User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post by DaCracker » Mon Jan 31, 2005 7:19 pm

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:
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Mon Jan 31, 2005 7:38 pm

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.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

snide
Gnoblar
Posts: 8
Joined: Fri Jan 14, 2005 12:48 pm
Location: Paris, France

Post by snide » Tue Feb 01, 2005 2:22 pm

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 ?
0 x

User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post by DaCracker » Tue Feb 01, 2005 8:30 pm

You can at least use the debug mode if you use Dev-C++ (that uses MingW) :)
(http://www.bloodshed.net/dev/devcpp.html)
0 x

Post Reply