Original Post
🔒 Locked
DevC++ and SDL_image problem
Advertisement
Nope, it's not.
The SDL_image file resided within the C:\Program Files\Dev-Cpp\Dll folder as the SDL.dll does, too.
However, I thought this is no point here, since I am trying to statically link to SDL?
Isn't the -lSDL_image flag supposed to link against the SDL_image.a library which is located in the C:\Program Files\Dev-Cpp\lib folder?
T.
The SDL_image file resided within the C:\Program Files\Dev-Cpp\Dll folder as the SDL.dll does, too.
However, I thought this is no point here, since I am trying to statically link to SDL?
Isn't the -lSDL_image flag supposed to link against the SDL_image.a library which is located in the C:\Program Files\Dev-Cpp\lib folder?
T.
Quote:
Original post by TroneX
Isn't the -lSDL_image flag supposed to link against the SDL_image.a library which is located in the C:\Program Files\Dev-Cpp\lib folder?
the -lSDL_image flag links to libSDL_image.a library.
AFAIK SDL_image packadge from devpaks is broken. download its sources and build the binaries yourself or get mine ( here )
Quote:
Original post by happybara
Download its sources and build the binaries yourself or get mine ( here )
Thanks a bunch, I used your package along with putting the -lSDL_image flag in the Project -> Project Options -> Linker parameters. It compiled correctly, but it doesn't seem load image files correctly (BMPs or PNGs). Any clue why?
image = IMG_Load("image.bmp"); // or image.pngif(image == NULL){ fprintf(stderr, "Unable to load image: %s\n", IMG_GetError());}It always outputs:
Unable to load image: Unsupported image formatI've tried playing around with putting the libpng1.dll and zlib.dll everywhere and no success.
Quote:
Original post by Rob Loach
It always outputs:Unable to load image: Unsupported image format
have you tried solutions from this thread ?
i use the img_load function to load textures this way:
SDL_Surface *img; img = IMG_Load(filename); if(!img) cout<<IMG_GetError()<<endl; SDL_LockSurface(img); //..Opengl stuff here.. SDL_UnlockSurface(img); SDL_FreeSurface(img); and i have not had problems with 24 and 32BPP images (PNG,TGA,BMP)
//edit:also, assure that your application use sdl_image.dll file from my package.
[Edited by - happybara on November 30, 2004 3:20:00 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement