Crossplatform (Cygwin) & png


I have a problem displaying .png files with cygwin/mingw in combination
with SDL_image’s IMG_Load(“file.png”) function.

I have tried to run a pre-compiled binary that does show it’s graphics,
using PNG files. I have compiled SDL_image successfully (not without
troubles though). Installed the dll’s, .la and .a libs.

I can compile and use SDL_image but only load .BMP files when using


gcc SDLTest.c -o SDLT -I/usr/local/include -I/usr/include/mingw
-L/usr/local/lib -lmingw32 -mwindows -mno-cygwin -lSDLmain -lSDL_image

And it works fine, w/o errors. But when it executes the
IMG_Load(png-file) command it segfaults. (SIGSEGV).

Any suggestions?