helloworld runtime error[solved]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
chaitanyaraghav
Posts: 12
Joined: Mon Jul 07, 2008 4:26 pm
Location: India

helloworld runtime error[solved]

Post by chaitanyaraghav »

Hi.
I just started to work with irrlicht and i am going through the tutorials.
I am using dev cpp ide and i set it up correctly.I opened the helloworld example and complied it and it complied quite successfully.Now when i run it all i get is a blank window and the console that appears gives me a message saying that "Could not load mesh,because file could not be opened.: ../../media/sydney.md2"

I tried to replace the ../../media/sydney.md2 to the actual location of the file i.e C:\irrlicht 1.4.1\media\sydney.md2 but it didnt work and i got the same error.

Please help! :?
Last edited by chaitanyaraghav on Sat Aug 23, 2008 7:19 am, edited 1 time in total.
Nobody is perfect!!
nd i am nobody!!
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

Your files should be in the same directory as the exe you are running.
chaitanyaraghav
Posts: 12
Joined: Mon Jul 07, 2008 4:26 pm
Location: India

Post by chaitanyaraghav »

ok thanks for the reply!
i copied the media folder in the irrlicht folder to the root directory of the
dev cpp compiler and edited the path from ../../media/sydney.md2 to
../media/sydney.md2 but is there anyother way to load the files!
Nobody is perfect!!
nd i am nobody!!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The files need not be in the same directory, they just have to be accessible via the relative path mentioned, starting in the current working directory. This is usually the directory where you start the app in. So just make sure that two directories above one can find the media directory.
If you use backslahes in C strings you have to escape them with another backslash ("abc\\trs") because otherwise \t would be changed to a tab character (or to other special characters...).
Post Reply