Hey all, I have a question on running an example of irrlicht..
I tried to compile an example in my IDE ( C::B) and everything went fine. program was running fine and without errors or warnings when I hit run in C::B, actually this was weird already because I didn't place the .DLL in the debug folder but the program whas running fine,.. then when I wanted to start my .exe outside of C::B it said that I had to place the .DLL in that debug folder so I did that and the program was running but the textures weren't showed because he couldn't find them ( due to wrong paths?) but If I ran the same .exe in C::B the textures *were* showed. I don't understand this couse I think it doesn't matter from where you start the .exe the paths are the same, right ?? so why does it run fine whitin C::B but does weird things outside of the IDE?? BTW that .DLL part, I told you, was weird too... but it wasn't a problem but unlike that this textures issue is a problem...
I am :
-Running on Windows XP
-ATI Radeon 9250
-Using Code::Blocks
- The example I was trying to run was 20. ManagedLights
- With IRRLicht 1.7.2
Thanks in advance
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.” (Eagleson’s Law)
Code blocks probably doesn't set the application's working directory to directory the application actually resides in, that's why you're experiencing these problems
NO, Then it was because I was too stupid to check the paths I think an then it was not running right in the IDE but also not right outside the IDE but now it's working fine in C::B but not outside of it.
BTW: I was also younger and more beginner when I posted there ( My english there )
Last edited by wahagn on Mon Mar 07, 2011 4:53 pm, edited 1 time in total.
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.” (Eagleson’s Law)
Radikalizm wrote:Code blocks probably doesn't set the application's working directory to directory the application actually resides in, that's why you're experiencing these problems
Yes now trying to figure out how to change the directoy...
BTW: I had the same problem when I was using IRRLicht before but then it was the opposite of now: .exe + paths worked fine outside but the textures where not showed when running it inside the IDE... DETAIL: I was using Eclipse back then
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.” (Eagleson’s Law)
Code blocks probably doesn't set the application's working directory to directory the application actually resides in
Yes, it doesn't do that, it actually sets working directory to where the source is, i think the main project folder, I always put my media/dlls there if I do some debugging.
I think that C::B search the file from the .cbp file so the textures were alright. But when you start the project outside the IDE it doesn't try to load the files from the project file -> Projectname/projectname.cbp but from Projectname/Debug/Projectname.exe. So if you want to use the .exe from outside the IDE you have to place the media folder one folder nearer the .exe in other words -> you have to place the media folder in the examples folder ... easy...
BTW: I still don't understand that .DLL part but I don't care
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.” (Eagleson’s Law)
If you run executable normally it will search for everything relative to its directory, unless you change your working directory from the executable itself, can't remember the function right now sth. like:
serengeor wrote:If you run executable normally it will search for everything relative to its directory, unless you change your working directory from the executable itself, can't remember the function right now sth. like: