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.