How to link statically with python15.lib.... 
Author Message
 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



Mon, 21 Jan 2002 03:00:00 GMT  
 How to link statically with python15.lib....
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.

Quote:

>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



Tue, 22 Jan 2002 03:00:00 GMT  
 How to link statically with python15.lib....

Quote:

> 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

IBM UK Laboratories Ltd., Hursley Park nr. Winchester
Internal: 7-246880      International: +44 1962-816880



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Statically link Python15.LIB instead of Python15.lib -> Python15.dll

2. Statically Linking tcl.lib and tk.lib into a standalone .exe file

3. Statically linking a Fortran .lib into a C++ .dll

4. how to statically link against tcl84.lib, tk84.lib, tclx84.lib?

5. statically linked tcl conflict with dynamically linked tcl error

6. Python15.lib?

7. Python15.lib as a single-threaded library under NT4

8. Linking sqldedev.lib, desktopenginedeploy.lib to my app: unsupported recordtype 21

9. Static vs Shared: Linking tcl83s.lib vs tcl83.lib

10. Not found error message from LabVIEW runtime when called from VC++ with statically linked MFC

11. linked-in drivers in statically typed languages

12. Debugging extension by statically linking with ruby.exe

 

 
Powered by phpBB® Forum Software