Sign in to follow this  

Compiling SDL_image with MinGW

This topic is 3199 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everybody. I think iam not quite a beginner, but the following questions are beginner like. :) I have my new pc system set up now and want to install all the libs and dev tools i get used to. So i installed my code::blocks and SDL. First Question: Why is SDL_image not included to SDL? In my Ubuntu system it is and its fine. Its also pre compiled for the GNU compilers. Couse there is no precompiled version of SDL_image for MinGW i have to compile it by myself. I dont think i can use the libs compliled with VC++, do i? The next problem is there arent any procompiled libs for libz, zlib, libpng, libtiff or libjpeg for MinGW. And i find it quite hard to compile everything without propper makefiles or project files (in my case for code::blocks). I used VC++ in the early days and it was much easier to use libs with it, than wit is with MinGW. But VC++ is ijn my opinion not a good choice if u want to do a cross-plattformm game and its not free. ;) Has anyone some tips for me? How can I make this less stressfull? Thx. Kie.

Share this post


Link to post
Share on other sites
Hi again,
i got a new Version of MinGW (http://nuwen.net/mingw.html) running with my codeblocks. Now everything is a bit easier to compile, beacause all libs needed for SDL_image are included, also is SDL itself.

After compiling SDL_image with my codeblocks to an dynamic link library ive got a SDL_image.dll and an libSDL_image.a whats fine!

I linked my SDL app against libSDL_image.a and out the SDL_image.dll in the working dir of my app. I added also the runtime dlls for the different file formats:

jpeg.dll
libpng12-0.dll
libtiff-3.dll
zlib1.dll

SDL.dll is of course in the same dir as well.

After starting my application nothing is shown, couse SDL_image is saying "Unsupported file format" via stderr.

I know i had this error the last time i installed SDL_image too, but i cant remeber the solution. Has anyone an idea?

Thx. Kie.

Share this post


Link to post
Share on other sites
Okay i found a solution: I use the prebuild SDL_image.dll from http://www.libsdl.org/projects/SDL_image/ and my own libSDL_image.a.

I am not quite satisfied, couse i dont understand what was wrong with my dll file. Has anyone the patience to tell me?

Thx. Kie.

Share this post


Link to post
Share on other sites
Quote:
Original post by thekie
Okay i found a solution: I use the prebuild SDL_image.dll from http://www.libsdl.org/projects/SDL_image/ and my own libSDL_image.a.

I am not quite satisfied, couse i dont understand what was wrong with my dll file. Has anyone the patience to tell me?

I vaguely seem to recall that you have to tell it which file types you want it to support.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
Quote:
Original post by thekie
Okay i found a solution: I use the prebuild SDL_image.dll from http://www.libsdl.org/projects/SDL_image/ and my own libSDL_image.a.

I am not quite satisfied, couse i dont understand what was wrong with my dll file. Has anyone the patience to tell me?

I vaguely seem to recall that you have to tell it which file types you want it to support.


Sorry cant follow you?

Do you mean i have to tell SDL_image which formats i want to use or do i have to tell MinGW which type of libs/dlls (?) i link against... *confused*

But thank you. :)

Kie.

Share this post


Link to post
Share on other sites

This topic is 3199 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this