SDL runtime problem

Hello,
I’m new to SDL programming. Recently, the mac sprite library
SpriteWorld was ported to SDL and I switched to the SDL version. I’m
having some problems with the SDL portion of it. After discussing it
with a member of the SW list, he suggested I go here.

The problem lies with loading image files using SDL_Image. IMG_Load
fails to create a SDL Surface.

Here’s the function progression.
SWLoadTilesFromSingleFileXY <-- Sprite World Function
IMG_Load
IMG_LoadTyped_RW

At this point it enters a for loop to detect the type of image. If
successful, it should return an SDL Surface. However, it goes
completely through the loop and hits this function.
IMG_SetError(“Unsupported image format”).

I’m running a Power Mac using OS X. My complier is CodeWarrior 8.
As for any libraries I’m using:
SDL - I complied the provided Carbon Debug Libraries
SDL_Image - Compiled Source code using CW 8 and told it to make a
library

Note: I am aware of the OS X dev. binaries. I however need Carbon
libraries, not Cocoa frameworks.

Luke Bailey

Hello,
I’m new to SDL programming. Recently, the mac sprite library
SpriteWorld was ported to SDL and I switched to the SDL version. I’m
having some problems with the SDL portion of it. After discussing it
with a member of the SW list, he suggested I go here.

The problem lies with loading image files using SDL_Image. IMG_Load
fails to create a SDL Surface.

Here’s the function progression.
SWLoadTilesFromSingleFileXY <-- Sprite World Function
IMG_Load
IMG_LoadTyped_RW

At this point it enters a for loop to detect the type of image. If
successful, it should return an SDL Surface. However, it goes
completely through the loop and hits this function.
IMG_SetError(“Unsupported image format”).

I’m running a Power Mac using OS X. My complier is CodeWarrior 8.
As for any libraries I’m using:
SDL - I complied the provided Carbon Debug Libraries
SDL_Image - Compiled Source code using CW 8 and told it to make a
library

It sounds like when you built SDL_image with CW 8, you didn’t add
support for whatever image format you’re using. You need to #define
some constants and link with the appropriate libraries for the format
you are trying to load. Look at the source files for the individual
formats for details.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment