[Image-SIG] Compiling PIL imaglibe 1.1.1 on Windows NT, using VC++ 6.0
Sat, 28 Oct 2000 11:19:17 +0200
Parzival Herzog wrote:
> 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.
this is a VC6-specific problem (I'm mostly using VC5), and I
plan to sort it out in the next major release.
(can anyone verify that the standard typedefs are 100% correct?
an ifdef around the PIL definitions is probably the best solution --
changing the names would break third-party code, and I'd rather
not bump the version number to 2.0 just for this)
> 2) The library would not link because the symbols declared in imaging.h:
> 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.
maybe you've misinterpreted the error message: these functions
are defined in several places (stub versions in the core library, and
Python-aware versions in the glue layer). for example:
$ grep ImagingError_IOError *.c libImaging/*.c
while Unix linkers are smart enough to pick the right version, Windows
will complain if you define the same function twice in the same project.
that's why the README file says:
Building your own copy under Visual Studio should be straightforward;
create a new project based on the sample extensions provided with
Python (the target should be "_imaging.dll"), add all C files except
"Except.c" and "coretest.c" to that project, check the contents of the
"ImConfig.h" file (modify it if necessary), and build the DLL.
in other words, remove Except.c, and everything should work.
> So I imagine that this version of the library has not been compiled on Win NT,
well, it's actually developed under Windows (originally on Win95,
currently on Win2K). but not under Visual Studio, and not under
the same version of VC as you're using.
> Can anyone shed more light on the cause and/or solution to this problem? I don't
> subscribe to the mailing list firstname.lastname@example.org, (please tell me how to subscribe),
hope this helps!