static program including python interpreter + dynamic python extensions
I have a problem that is somewhat related to Alexandre Gillet's ones:
"build a static python executable".
I would like to make a C[++] program scriptable. Therefor, I have included
a python interpreter into the program. Additionally I have wraped all the
program's interfaces that I need, using SWIG. Finally, I have created a
shared library, which includes this interface and all functions that are
to be available from within python scripts. And it works: one can write
a script, which can access the program's routines and data, the main
program correctly loads them, using its python interpreter.
However, the program has to be linked dynamically. Once I try to change
the main program's linkage to static, loading any module, that is not a
plain python file (but a shared library), fails, saying:
Fatal Python error: Interpreter not initialized (version mismatch?)
Since I need the program to be linked statically, I would appreciate any
hint on how to fix this problem.
I'm using gcc 3.2 under linux (2.4.19) and python 2.3.2 (also checked with
|All times are GMT. The time now is 09:24 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.