views:

95

answers:

1

I'm trying to compile SDL_Image 1.2.10 with MinGW + MSys (gcc 4.5.0) on Windows, I have compiled all the requires libs (zlib 1.2.5, libpng 1.4.2, libjpeg 8a, libtiff 3.9.2). SDL_Image compiles fine, but fails to link to libpng, throwing .libs/IMG_png.o:IMG_png.c:(.text+0x16): undefined reference errors on various png structs.

If I run ./configure --prefix=/mingw --disable-png for SDL_Image, it compiles and links against the other libs just fine. I have tried older versions of libpng (1.2.43), but they also caused SDL_Image to throw the same errors.

A: 

Downgrading my GCC suite to 4.4.0 fixed the problem, it seems 4.5.0 still has a few teething issues. Unless someone comes up with a better answer as to why I can't link properly with GCC 4.5.0 I shall mark my own answer as correct.

Tim Jones