[C++-sig] Boost Pro Python Version
Marcus Lindblom
macke at yar.nu
Wed Jan 28 10:29:47 CET 2009
Cameron Royal wrote:
> So I'm having some difficulty getting one of the boost.python tutorial
> examples working. In particular the class with a string constuctor.
>
> http://www.boost.org/doc/libs/1_37_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.constructors
>
> This exact example crashes for me in Visual Studio with an exception at line
> 75 in <boost/python/detail/invoke.hpp>. I've read a few other forum posts
> and I can only assume there was something wrong with my build / config
> seeing as this seems like a trivial example.
>
> I am using the free boost download (http://www.boostpro.com/products/free)
> for VC9 and Python 2.5. I'm wondering if this is the right version of Python
> for that build? I couldn't find in the download any indication of what
> python version it's expecting, or if it evens matters.
Depends on your python binary. IIUC, python and its extensions needs to
be built with the same compiler. (I recall getting complaints on that
from setuptools.)
I think Python 2.5 (as released on python.org) was built with VC71.
Python 2.6 uses VC90, so going there might help.
HTH
/Marcus
P.S. I'd wish Python would use something like JNI to avoid this. Would
make it much eaiser to distribute and use extension binaries. IIRC there
was a PEP for PNI, but that got voted down. :-/
More information about the Cplusplus-sig
mailing list