I'm having a problem with loading textures in soil at the moment. It only seems to work when I give to whole directory of the file as opposed to the directory relative to the executable file.
Code :
tex = SOIL_load_OGL_texture(afilename,SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);

It works fine if I type in the directory like this:
Code :
tex = SOIL_load_OGL_texture("Data/Image.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);

but I've checked
Code :
afilename
and it's identical to "Data/Image.png".

I can't understand what could be causing this error.

Thanks,
Rowan.