[Python-Dev] Static builds on Windows

Thomas Heller theller at python.net
Thu Jul 29 20:33:13 CEST 2004

Nick Coghlan <ncoghlan at iinet.net.au> writes:

> Martin v. Löwis wrote:
>> Thomas Heller wrote:
>>> Related to this issue: Would it be a good idea to add a project to the
>>> MSVC workspace which builds a static library?  This could either be used
>>> directly, or as a staring point for customization.

>> Depends on whether it is going to be maintained. If it is, it might
>> be a good idea. If it is once created, and then only updated every
>> two years when somebody actually needs it, it might be pointless - it
>> would be just as much work to recreate it from scratch every time.
> If there was going to be both the ability to create a static lib and a
> dynamic lib, it would seem to make more sense to have the project for
> the dynamic lib project simply incorporate the static lib, and export
> the relevant symbols.

That is a good idea, and would solve the maintainace problem.
Unfortunately, it doesn't work with the current setup, since modules
have to be compiled with different preprocessor definitions for the
static and the shared lib.

> We do something similar at work (VC6, rather than 7), although we're
> combining a dozen or so static libs to produce the DLL. All the real
> source code is in the libraries, and the DLL project consists mainly
> of a list of include directives, and enough symbol references to get
> everything exported correctly.

I guess you need a def file as well, or another way to define the
exported functions?


More information about the Python-Dev mailing list