[Image-SIG] Error compiling PIL 1.1.5b1 with mingw

David Fraser davidf at sjsoft.com
Wed Nov 24 16:45:57 CET 2004


Hi

I have had an error building PIL 1.1.5b1 (the Python Imaging Library) 
with mingw. This is with the latest versions of gcc etc (3.4.2)
The error is as follows:
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DHAVE_LIBJPEG 
-IlibImaging -IC:\Python\Python2.3.3\
include -Ie:/download/Python/test/jpeg-6b-3-lib\include 
-IC:\Python\Python2.3.3\include -IC:\Python\
Python2.3.3\PC -c encode.c -o build\temp.win32-2.3\Release\encode.o
In file included from 
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h:164,
                 from 
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h:246,
                 from 
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h:48,
                 from 
e:/download/Python/test/jpeg-6b-3-lib/include/jconfig.h:10,
                 from 
e:/download/Python/test/jpeg-6b-3-lib/include/jpeglib.h:24,
                 from libImaging/Jpeg.h:11,
                 from encode.c:484:
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h:110: 
error: syntax error before
',' token
error: command 'gcc' failed with exit status 1

The version of w32api installed is 3.1
The offending line in basetsd.h is:
typedef __int64 INT64,  *PINT64;

I suspect this error comes from the following line in 
libImaging/ImPlatform.h:
#if SIZEOF_LONG == 8
#define INT64 long
#elif SIZEOF_LONG_LONG == 8
#define INT64 long
#endif

I am posting this message to both the mingw-users list and the image-sig 
list for PIL as I'm not sure which of these is a problem, although they 
are clearly incompatible... I'll feed back to the other list if I get a 
solution from one

Regards
David


More information about the Image-SIG mailing list