[Image-SIG] Compiling PIL imaglibe 1.1.1 on Windows NT, using VC++ 6.0

Parzival Herzog parz@home.com
Sat, 28 Oct 2000 01:39:49 -0500


Hello,

I have been trying to compile the Python Imaging Library 1.1.1 on =
Windows Nt 4.0
using VC++ 6.0. I have encountered two problems:

1) The library includes standard headers, which under VC++, eventually =
pull in
<basesetd.h>. This file defines basic datatypes used by MS. Among them, =
is
"UINT32". This typedef conflicts with the macro "UINT32" defined in =
implatform.h.
I "solved" this conflict by changing all the macro definitions in =
"implatform.h" to
be (nearly) equivalent typedefs, and in a few places in the imaging =
library code where
there were usages that assumed macros such as "unsigned INT32", I =
changed these to the the type now defined in "implatform.h", say =
"UINT32". The library then compiled without
syintax errors.


2) The library would not link because the symbols declared in imaging.h:

/* Exceptions */
/* ---------- */

extern void* ImagingError_IOError(void);
extern void* ImagingError_MemoryError(void);
extern void* ImagingError_ModeError(void); /* maps to ValueError by =
default */
extern void* ImagingError_Mismatch(void); /* maps to ValueError by =
default */
extern void* ImagingError_ValueError(const char* message);


are not defined. As far as I can tell these are functions not =
exceptions. There
is no code defining these symbols in the distribution. I also have not =
found
any documentation about these symbols. I don't know about UNIX, but as =
far as I
know, a Windows dll can't be built with undefined symbols.=20

So I imagine that this version of the library has not been compiled on =
Win NT,
Also, I imagine that the interface to the library must have changed to =
require
some external definition of the symbols, but there is no documentation.

So either I am ignorant of some essential fact, or perhaps there are a =
couple of
problems in this version of the source code.

Can anyone shed more light on the cause and/or solution to this problem? =
I don't
subscribe to the mailing list image-sig@python.org, (please tell me how =
to subscribe), so please email me any response that you have.

Thanks, Parzival

=20