Mailing List Archive

How to link statically with python15.lib....
Hello. Could someone please tell me how to link statically to python15.lib
using MSVC6.0 Prof. Edit. ?
I want to do this in order to avoid messing with *.dll's that may reside on
the installation platform. I'm not
really into install shield or anything ; just wanted to do it the easy way
(if there is one). Guess I'll have to
link to tcl80.lib and tk80.lib as well..?

Thanks in advance,

Anders Moe
How to link statically with python15.lib.... [ In reply to ]
You cant. These .lib files are only import libraries for the DLL. They do
not contain the code, just pointers to the code in the DLL. Same goes to
Tcl/Tk.

Your only option is to completely rebuild both Python and Tcl/Tk from
sources. I dont know about Tcl/Tk, but Python does not include any support
for that at all - you will probably need to modify the VC project files etc
to make it work.

I dont really know what you expect to save. If you ensure you distribute
Python15.dll with your app and place it in the same directory as your app,
you shouldnt have a problem. And Python being Python, you will have alot of
work ahead to get a true, 1 file installation. Look at Freeze and the
"Win32 Installer" from Gordon McMillan and see if these better suit your
requirements.

Mark.

Egeland wrote in message ...
>Hello. Could someone please tell me how to link statically to python15.lib
>using MSVC6.0 Prof. Edit. ?
>I want to do this in order to avoid messing with *.dll's that may reside on
>the installation platform. I'm not
>really into install shield or anything ; just wanted to do it the easy way
>(if there is one). Guess I'll have to
>link to tcl80.lib and tk80.lib as well..?
>
>Thanks in advance,
>
>Anders Moe
>
>
How to link statically with python15.lib.... [ In reply to ]
Egeland wrote:
>
> Hello. Could someone please tell me how to link statically to python15.lib
> using MSVC6.0 Prof. Edit. ?
> I want to do this in order to avoid messing with *.dll's that may reside on
> the installation platform. I'm not
> really into install shield or anything ; just wanted to do it the easy way
> (if there is one). Guess I'll have to
> link to tcl80.lib and tk80.lib as well..?
>

If you rebuild Python as a static library embedded in an application
you will not be able to dynamically load any C extensions because Python
relies on backlinking which is not supported on Windows, nor can it be
emulated on Windows as it is on the various Unixes (AIX is what I know)
which don't support it "properly".

Tcl and Tk on the other hand can be statically linked into an
application and still dynamically load C extensions because it uses
its 'own' linking mechanism.

--
Paul Duffin
DT/6000 Development Email: pduffin@hursley.ibm.com
IBM UK Laboratories Ltd., Hursley Park nr. Winchester
Internal: 7-246880 International: +44 1962-816880