DevC++ and SDL_image problem
Using DevC++, I added -lSDL_image to the parameters of the linker.
Although, evertything seems to be installed correctly (SDL_image 1.2.3 from devpaks.org), I get the following error message:
ld.exe (...) cannot find -lSDL_image
Does anyone know what's the problem?
Regards,
T.
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 )
Some time ago I also tried to do -lSDL_Image stuff in DevC++ but it didn't worked. Then I tried explicitly saying where that lib is stored through full pathname (Project settings -> Parameters -> Linker) and now it's working.
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 format
I'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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement