Author Topic: locating files in the current directory with the debugger  (Read 2451 times)

jweav

  • Guest
locating files in the current directory with the debugger
« on: March 02, 2009, 06:31:30 pm »
I'll try to explain the problem I'm having, I was unable to find a solution with the search. Probably because I'm not sure what I'm exactly searching for.

When typing out the path for a file to access (c++) I have to type out the full path for the debugger to recognize it.
However when i run the actual .exe it works fine. Heres an example. say the project/.exe are stored in "M:/Project"

loadTextures("M:/Project/Data/texture.tga");  // This works in the debugger and the with just running the .exe by itself
loadTextures("Data/texture.tga");  //This works only when running the .exe by itself.

I would like to have the second example working with the debugger so I don't have to change it constantly when i move computers to work on my code. I read there was an option somewhere in codeblocks to make the compiler work that way, I would appreciate if someone could point out what setting I should look at or change. I went through the options  but I don't know the lingo very well and was confused. Any help would be very much appreciated. Thanks.

extra info:
using glfw/opengl, c++, windows xp, codeblocks version 8.02