static and dynamic library ?

Daniel Dittmar daniel at dittmar.net
Tue Sep 11 15:04:47 EDT 2001


Armin Samide wrote:
> I have a little problem embeding the Python interpreter in a c++ app.
> I have built python from the sources and got ( beside a lot of other
> output ) python21.dll and python21.lib
[...]
> So what do I have to do if I want to create a standalone executable not
> depending on any library ?

You could change the Python project to produce a .lib, not a .dll (the
python21.lib is just an import lib so your program knows it has to load
python21.dll).

But other extension modules will not work because they want access the
Python runtime through the DLL. So all the modules in <python dir>\DLLs
can't be imported. Of course you could add that code to your static
python21.lib as well.

Daniel



More information about the Python-list mailing list