Skip to main content
gamedev.net
🔒 Locked

SDL image problems

Started by slymr 4 replies 1.3k views
Original Post
slymr
slymr
I am trying to load a gif. As a side note I am using Code::Block.

    SDL_Surface* gif;
    SDL_RWops * rwop;
    rwop = SDL_RWFromFile("cb2.gif", "rb");
    gif = IMG_LoadGIF_RW(rwop);
And the error message: Project : SDL Application Compiler : GNU GCC Compiler (called directly) Directory : **** -------------------------------------------------------------------------------- Switching to target: default Linking console executable: SDLapp.exe .objs\main.o:main.cpp:(.text+0x14c): undefined reference to `IMG_LoadGIF_RW' collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 0 seconds) Can see my error?
slymrHopefully game is in progress.
RedDragon0509
RedDragon0509
did you include SDL_image.h?
When the world can't make you smile, program one that can
slymr
slymr
yep
slymrHopefully game is in progress.
Replicon
Replicon
What about SDL_rwops.h? (though if it's not complaining about the other rw stuff, it should be fine).

Are you linking everything in properly? -lSDL_image or whatever?

Also, isn't there a rw version of IMG_Load(), which should work on pretty much any type?
slymr
slymr
Quote:
Original post by Replicon
What about SDL_rwops.h? (though if it's not complaining about the other rw stuff, it should be fine).

Are you linking everything in properly? -lSDL_image or whatever?

Also, isn't there a rw version of IMG_Load(), which should work on pretty much any type?


I have no idea what you are talking about.

Quote:

make sure you installed everything for sdl_image currectly
lazy foo's tutorial on Setting up SDL Extension Libraries in Code::Blocks

Thanks. I had a dumb error of forgetting to move over the lib file thanks

[Edited by - slymr on June 7, 2006 10:18:20 PM]
slymrHopefully game is in progress.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.