Trouble with loading files

Hello there!

I’m just a beginner when it comes to SDL.
I have the following problem:

My simple code uses SDL, SDL_image and SDL_mixer headers.
I load two pictures using IMG_load() function and one mp3 file using
Mix_LoadMUS() function.
All the source files are in the same directory as mi source file.
I encounter no problem when runig the binary, but when I try to run the
program on other PC (with same OS of course) there is problem in loading the
files. I included error output when it fails to load the picture/mp3, so I
am postive that the problem lies there. I have even specified the directory
in the loading functions as follows: e.g. image = IMG_load(".\blabla.jpg");
I have all dlls needed to run the program in the directory of course, that
is SDL.dll, SDL_image.dll, SDL_mixer.dll
Why the program fail to load the source files? I don’t know were the problem
is.
Thank you for help–
View this message in context: http://www.nabble.com/trouble-with-loading-files-tf4728698.html#a13521064
Sent from the SDL mailing list archive at Nabble.com.

What does SDL_GetError() return when the loading fails? Also, this may
seem like a silly question, but are the files you load also included
with the program on the other PC?
-:sigma.SB

This is my stderr.txt :
Couldn’t open background.jpg
Couldn’t read from ‘music.mp3’
(these were returned by SDL_GetError()
And of course, the files are included in the same directory as the program
also on other PCs.

Solra Bizna wrote:>

What does SDL_GetError() return when the loading fails? Also, this may
seem like a silly question, but are the files you load also included
with the program on the other PC?
-:sigma.SB


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/trouble-with-loading-files-tf4728698.html#a13528994
Sent from the SDL mailing list archive at Nabble.com.

This is a really odd problem.
What happens if you remove the “.\” from the pathname, or even change
it to “./”?
-:sigma.SB

Absolutely nothing. It works on my PC wheter I type ./ or nothing, just the
name of the file.
But on the other PCs it behaves always the same, it won’t load the source
files.

Solra Bizna wrote:>

This is a really odd problem.
What happens if you remove the “.\” from the pathname, or even change
it to “./”?
-:sigma.SB


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


View this message in context: http://www.nabble.com/trouble-with-loading-files-tf4728698.html#a13554844
Sent from the SDL mailing list archive at Nabble.com.

What happens if you put the files to be loaded directly into C:? It’s
possible that it’s some weird working directory issue…
-:sigma.SB

Have you tried using an absolute path? ‘C:\path\to\data\music.mp3’.On 03/11/2007, Solra Bizna wrote:

What happens if you put the files to be loaded directly into C:? It’s
possible that it’s some weird working directory issue…
-:sigma.SB


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org