ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] BPL: include breaks import in IDLE
by David Abrahams other posts by this author
Feb 22 2001 4:25PM messages near this date
BPL: include breaks import in IDLE | Re: BPL: include breaks import in IDLE
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@[...]..> 
To: <boost@[...].com> 
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/
> 
> 
Thread:

David Abrahams


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved