From: David Abrahams (dave_at_[hidden])
Date: 2008-03-12 21:01:42
on Thu Feb 21 2008, "Robert Dailey" <rcdailey-AT-gmail.com> wrote:
> Well I did a little more Trial & Error experimentation, and I've found that
> I get different behavior if I include <Python.h> before <boost/python.hpp>
> versus if I just omit <Python.h> inclusion all together.
Yes, http://boost.org/libs/python/doc/building.html#include-issues and
the section that follow explain why you should not include <Python.h>
> When I only include
> <boost/python.hpp>, I get an assertion instead of a crash. This assertion
> spits text out to my console window as follows:
> *Assertion failed: (op->_ob_prev == NULL) == (op->_ob_next == NULL), file
> ..\Objects\object.c, line 63*
Which tells me that you have a mismatch between Boost.Python's idea of
whether it is a debugging build and the Python executable or library's
> This assertion occurs during the call to Py_Initialize(). At this point this
> seems a little out of scope of boost (since at this point I haven't even
> called anything from boost that I'm aware of). I'm going to post this on the
> python mailing list to see if I can get some opinions there as well.
If you follow the instructions at
http://boost.org/libs/python/doc/building.html and pass
on your bjam command line, everything "just works."
-- Dave Abrahams Boost Consulting http://boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk