Problems with boost.python

Started by
12 comments, last by the_edd 15 years, 4 months ago
Quote:Original post by visitor
Not that I have done this myself, but did you follow the steps on the next page of that tutorial. I would somehow expect that you get both a binary dll and a python module since it would be strange for python to understand a binary file... (but I'm a total noob in this and might try it if you work it out :))

afaik a pyd is just a renamed dll.

Advertisement
Quote:Original post by Kylotan
Quote:Original post by the_edd
There have been a couple of recent releases for Python so it may be the case that the C API has changed.

Yep, the Python C API changes for every minor release (eg. 2.5 to 2.6). This means that native-code compiled extensions have to be built individually against each version. h3ro has to make sure that the python.h on his compiler's path is for the same version of Python that is trying to import the module. (If there is only 1 Python installation, obviously this won't be the problem.)


I only have one version installed, version 2.6

EDIT:
Is there an other wrapper for python which is easier to get to work? Or maybe a different scripting language?
I must admit I wrap my Python by hand, but then I am a bit of a masochist. (And also consider Boost::Python very heavyweight and awkward.)

If you try the FAQ for the Scripting Languages and Mods forum, I think I listed some Python wrapper libraries in there. Or Google, using keywords like Python, wrappers, bindings, C++, etc.
Quote:Original post by h3ro
EDIT:
Is there an other wrapper for python which is easier to get to work? Or maybe a different scripting language?


You could look at Lua. There are a bunch of C++ libraries that allow you to easily create a bridge to Lua. My favorite is Luabind, but google around and you'll find a bunch of others, some of which you might personally prefer. The C API is really rather nice anyway, so you could even go without a wrapper if needed.

This topic is closed to new replies.

Advertisement