Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-02-22 11:25:26


Ron,

I'm not sure exactly what problem you're having, but if you're making a
debug build under Win32, you may be running into the following issue:

Without special treatment, if _DEBUG is defined, #including <python.h>
causes you to make a special "python debugging" build of your code, which
needs to be run under a special debugging version of python (python_d.exe)
and use special debugging versions of the python DLL. Since most people
don't get those components with a stock Python installation, I disable the
special "python debugging" mode in Boost.Python by using
boost/python/detail/wrap_python.hpp instead of python.h directly (python
debugging can be re-enabled with -DDEBUG_PYTHON). You should probably be
#including wrap_python.hpp instead of python.h

HTH,
Dave
----- Original Message -----
From: <rcspython_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 21, 2001 3:18 PM
Subject: [boost] BPL: include <python.h> breaks import in IDLE

> I am wrapping a class with BPL which does I/O.
> BPL works great when I create the wrapper code (single thread)
> but when I try to
> #include "python.h"
> in the original code's header file (I need to wrap the original C++
> code with the Py_BEGIN_ALLOW_THREADS Macros), the rebuilt dll fails
> to load under IDLE or PythonWin.
>
> eg:
> >>> import PTW
> Traceback (innermost last):
> File "<interactive input>", line 1, in ?
> ImportError: DLL load failed: The specified module could not be found.
>
> Is there some trick I am missing here?
>
> Does BPL has an analogous Macro for making the class multithreaded?
>
> This is going to be used in a multithreaded Python app and has to
> allow this behavior.
>
>
> Best Regards,
>
> Ron
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk