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 »

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?
:(
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 »

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.
User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post 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.....
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post 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.
User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post 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)
:(
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post 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!' ;)
User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post 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:
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

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

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 ?
User avatar
DaCracker
Gremlin
Posts: 192
Joined: Thu Jan 27, 2005 9:57 am
Location: Sweden
Contact:

Post 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)
Post Reply