[SDL] SDL_image and multiple partitions

Torsten Giebl wizard at syntheticsw.com
Fri Jul 6 15:39:22 PDT 2007


Hello !


>   I have a project in MSVS that worked fine. Then I created another
> partition on my hard drive to store all my things. I moved the project
> folder to that partition, and windows (with SDL files) & MSVS are still
> on the other partition. I think I fixed all the linking stuff correctly
> because it does compile. But when I execute, it fails at loading the
> image I need. The image is stored in the project folder with the source
> code and executable. Why can't it find the image?


What is the exact structure of your image filenames
when you load them ? "\dsds" or "dsds" .. ?

If you only have a small number of images,
just change the names to absolute paths
like "C:\Images\dsds.jpg"

If your app then runs well again, it was the only problem
to find the images, if not, you forgott something else.

Absolute paths are only good for debugging,
for shipping your game/app after that, they are really bad.

In my code i use something like this :

err = GLB_Load_Sprite (the_file -> useDataDir ("gfx/sprites/spr/KNEE.spr"),
                                    & Spr_Turrican_Knee,
GLB_BOB_TRANS_FALSE);


CU



More information about the SDL mailing list