SDL_image mingw compiling issue

Any help on this guys? Or a better place to ask?

Hey there. I’ve got a fresh install of mingw with msys on a windows 7 x64
system.

g++.exe (GCC) 4.5.0
SDL 1.2.14
SDL_image 1.2.10

I was able to compile libz, libpng, libjpeg, libtiff, and SDL, but when I
try to compile SDL_image I get the following errors.

IMG_png.c: In function IMG_InitPNG': IMG_png.c:250: warning: assignment from incompatible pointer type IMG_png.c: In functionIMG_LoadPNG_RW’:
IMG_png.c:350: error: dereferencing pointer to incomplete type
IMG_png.c:419: error: dereferencing pointer to incomplete type
IMG_png.c:421: error: dereferencing pointer to incomplete type
IMG_png.c:429: error: dereferencing pointer to incomplete type
IMG_png.c:477: error: dereferencing pointer to incomplete type
IMG_png.c:478: error: dereferencing pointer to incomplete type
IMG_png.c:479: error: dereferencing pointer to incomplete type
IMG_png.c:480: error: dereferencing pointer to incomplete type
IMG_png.c:481: error: dereferencing pointer to incomplete type
IMG_png.c:482: error: dereferencing pointer to incomplete type
make: *** [IMG_png.lo] Error 1

I’ve run
./configure --prefix=/mingw
make

Can anyone help me out here? It’s a function pointer issue for non-dynamic
png loading, according to what I saw in IMG_png.c.

It looks like any attempt to dereference a png_struct or png_info is failing. The question is why these pointers are opaque/incomplete, they should be defined explicitly in png.h.

m.From: sdl-bounces@lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On Behalf Of Gesang Baer
Sent: Tuesday, September 07, 2010 7:10 PM
To: sdl at lists.libsdl.org
Subject: [SDL] SDL_image mingw compiling issue

Any help on this guys? Or a better place to ask?

Hey there. I’ve got a fresh install of mingw with msys on a windows 7 x64
system.

g++.exe (GCC) 4.5.0
SDL 1.2.14
SDL_image 1.2.10

I was able to compile libz, libpng, libjpeg, libtiff, and SDL, but when I
try to compile SDL_image I get the following errors.

IMG_png.c: In function IMG_InitPNG': IMG_png.c:250: warning: assignment from incompatible pointer type IMG_png.c: In functionIMG_LoadPNG_RW’:
IMG_png.c:350: error: dereferencing pointer to incomplete type
IMG_png.c:419: error: dereferencing pointer to incomplete type
IMG_png.c:421: error: dereferencing pointer to incomplete type
IMG_png.c:429: error: dereferencing pointer to incomplete type
IMG_png.c:477: error: dereferencing pointer to incomplete type
IMG_png.c:478: error: dereferencing pointer to incomplete type
IMG_png.c:479: error: dereferencing pointer to incomplete type
IMG_png.c:480: error: dereferencing pointer to incomplete type
IMG_png.c:481: error: dereferencing pointer to incomplete type
IMG_png.c:482: error: dereferencing pointer to incomplete type
make: *** [IMG_png.lo] Error 1

I’ve run
./configure --prefix=/mingw
make

Can anyone help me out here? It’s a function pointer issue for non-dynamic
png loading, according to what I saw in IMG_png.c.


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email


It might be a zLib/libng issue. I was able to compile SDL_image just
fine using mingw/gcc 4.5.0

The versions I used

zLib 1.2.3
libpng 1.4.3
tiff 3.8.2
SDL 1.2.14
SDL_image 1.2.10

I noticed had to downgrade to zLib 1.2.3 when I was compiling libpng
1.4.3 in Visual Studio 2010. It complained about a missing gzio.c .

Your error is the kind usually seen when something is missing. Perhaps
a change in zLib from 1.2.3 1.2.5 is causing this?On Tue, Sep 7, 2010 at 7:10 PM, Gesang Baer wrote:

Any help on this guys? Or a better place to ask?

Hey there. I’ve got a fresh install of mingw with msys on a windows 7 x64
system.

g++.exe (GCC) 4.5.0
SDL 1.2.14
SDL_image 1.2.10

I was able to compile libz, libpng, libjpeg, libtiff, and SDL, but when I
try to compile SDL_image I get the following errors.

IMG_png.c: In function IMG_InitPNG': IMG_png.c:250: warning: assignment from incompatible pointer type IMG_png.c: In function IMG_LoadPNG_RW’:
IMG_png.c:350: error: dereferencing pointer to incomplete type
IMG_png.c:419: error: dereferencing pointer to incomplete type
IMG_png.c:421: error: dereferencing pointer to incomplete type
IMG_png.c:429: error: dereferencing pointer to incomplete type
IMG_png.c:477: error: dereferencing pointer to incomplete type
IMG_png.c:478: error: dereferencing pointer to incomplete type
IMG_png.c:479: error: dereferencing pointer to incomplete type
IMG_png.c:480: error: dereferencing pointer to incomplete type
IMG_png.c:481: error: dereferencing pointer to incomplete type
IMG_png.c:482: error: dereferencing pointer to incomplete type
make: *** [IMG_png.lo] Error 1

I’ve run
./configure --prefix=/mingw
make

Can anyone help me out here? It’s a function pointer issue for non-dynamic
png loading, according to what I saw in IMG_png.c.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org