[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    python as a static library with Visual Studio 2005
From:       "Patrick Stinson" <patrickkidd.lists () gmail ! com>
Date:       2007-11-28 1:14:17
Message-ID: 664bf2b80711271714h571db3ddu7310efacae128033 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


There doesn't seem to be any clear documentation on how to build python as a
static library using Visual Studio 2005. Everything builds, links, and runs
fine using python as a dll, but I get a ton of unresolved symbols using a
static library.

I defined Py_NO_ENABLE_SHARED=1 in the library project in
Python-2.5.1\PCBuild8, and changed the project type to "static library", and
set the output file to be python25.lib. If I try to link the included python
executable (which simply resolves the function Py_Main) to the static
library it complains about the symbol __imp__Py_Main being undefined. If I
link my application to the static library it complains about every symbol
that my code uses with "__imp__" prepended to each name, just as described
with __imp__Py_Main above.

Is there a straight forward way to compile the basic python interpreter as a
static library in Visual Studio 2005? Am I overlooking the documentation for
this??

Thanks in advance


-- 
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/

[Attachment #5 (text/html)]

There doesn&#39;t seem to be any clear documentation on how to build python as a \
static library using Visual Studio 2005. Everything builds, links, and runs fine \
using python as a dll, but I get a ton of unresolved symbols using a static library. \
<br><br>I defined Py_NO_ENABLE_SHARED=1 in the library project in \
Python-2.5.1\PCBuild8, and changed the project type to &quot;static library&quot;, \
and set the output file to be python25.lib. If I try to link the included python \
executable (which simply resolves the function Py_Main) to the static library it \
complains about the symbol __imp__Py_Main being undefined. If I link my application \
to the static library it complains about every symbol that my code uses with \
&quot;__imp__&quot; prepended to each name, just as described with __imp__Py_Main \
above. <br><br>Is there a straight forward way to compile the basic python \
interpreter as a static library in Visual Studio 2005? Am I overlooking the \
documentation for this??<br><br>Thanks in advance<br><br><br>-- <br>Patrick Kidd \
Stinson <br><a href="http://www.patrickkidd.com/" \
target="_blank">http://www.patrickkidd.com/</a><br><a \
href="http://pkaudio.sourceforge.net/" \
target="_blank">http://pkaudio.sourceforge.net/</a><br><a \
href="http://pksampler.sourceforge.net/" target="_blank"> \
http://pksampler.sourceforge.net/ </a>



-- 
http://mail.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic