Embedded Python issues
I am having some issues with embedding Python.
The issues seem to be with building the right configuration for boost.
What I am trying to do is to run the embedded.cpp sample that comes with boost.python.
The sample compiles fine, but it is giving me the following error at run time:
Traceback (most recent call last):
File "", line 1, in ?
SystemError: _PyImport_FixupExtension: module embedded_hello not loaded
I am compiling boost as a dynamic lib, and embedded.cpp is compiled into a console application.
I am using VS.NET 2003, Python 2.3, and boost 1.30.2.
Do I have to build the python sources? (I am just using the binaries that come with the Windows distribution).
My goal is to have a single .exe that embeds the interpreter and defines modules that can be used form the scripts. I do not want extensions (pyd) files, I want all the extension code to be on the exe. I am not very interested on building stuff with Jam, so it would be very useful to get configuration information from somebody that has done this before in the PC with VS.NET.
Thank you,
ldeej
I found the issue. boost.python 1.30.2 does not support Python 2.3. They seem to be partially compatible, but the embedding part seems to be broken.
I installed Python 2.2 and everything worked correctly. There is a new version of boost due soon that will support 2.3.
Hope this helps anybody else running into the same issue.
Thanks,
ldeej
I installed Python 2.2 and everything worked correctly. There is a new version of boost due soon that will support 2.3.
Hope this helps anybody else running into the same issue.
Thanks,
ldeej
You are correct that boost.python 1.30.x doesn''t support Python 2.3, however, boost are about to release 1.31. In fact they''ve pretty much locked the development tree at RC3, and there are no showstoppers with the regression tests, so it should be available any day now.
You can jump the gun if you wish and download a snapshot of 1.31. I did this weeks ago and have been using it with Python 2.3 quite successfully.
There are a few caveats here though. If you are using VC6, there are some libraries that dont support it anymore. I couldn''t compile the Spirit library (a parser framework, very nifty) with 6 and read that the new version is only supported in VC7. I understand that this may also be the case with other compilers as well.
cheers
John
You can jump the gun if you wish and download a snapshot of 1.31. I did this weeks ago and have been using it with Python 2.3 quite successfully.
There are a few caveats here though. If you are using VC6, there are some libraries that dont support it anymore. I couldn''t compile the Spirit library (a parser framework, very nifty) with 6 and read that the new version is only supported in VC7. I understand that this may also be the case with other compilers as well.
cheers
John
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement