Brian O'Kennedy wrote:
After diving deeper into boost.python and python than I felt comfortable
with, I found my own stupid mistake.
On Windows, the presence of _DEBUG causes Py_DEBUG to be defined, but
this is not the case on Linux. When I include boost/python.hpp I need to
define both BOOST_DEBUG_PYTHON and Py_DEBUG: Currently I'm wrapping
includes of boost.python like so:
-------------------------------------------------------------
#define BOOST_PYTHON_NO_LIB
#ifdef _DEBUG
#define BOOST_DEBUG_PYTHON
#ifndef WIN32
#define Py_DEBUG
#endif
#pragma comment(lib, "boost_python-vc80-mt-gyd-1_38.lib" )
#else
#pragma comment(lib, "boost_python-vc80-mt-1_38.lib" )
#endif
#include <boost/python.hpp>
-------------------------------------------------------------
Hi,
Do you know how Py_DEBUG is getting set on windows? I'm wondering where
to fix this. Boost.build? in boost/python.hpp itself?
-t
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig