[C++-sig] wrap_python.hpp errors on Mac OS X

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Fri Apr 9 05:49:29 CEST 2004


--- James Mastro <jmastro at rochester.rr.com> wrote:
> I'm trying to use Boost.Python on Mac OS X 10.3.3, with boost 1.31.0. I 
> finally got module building working right, and my Python objects can 
> call into some wrapped C++ libraries of mine.
> 
> But, I want to be able to go the other way, too. Have my C++ code call 
> methods on the Python objects I create. But when I try to include 
> <boost/python.hpp>, I get errors in the wrap_python.hpp file. The 
> errors are:
> 
> patchlevel.h: No such file or directory
> Python.h: No such file or directory
> 
> The Python.h error I can easily fix. For the other, just commenting out 
> the include of patchlevel.h seemed like a grand idea. But then I start 
> getting compile errors in convertible.hpp (which might be happening 
> even with my hacking in patchlevel.h) The boost.python site says it's 
> known to work on 10.3, but it's not for me. Any ideas? I can use the 
> Python/C API, of course, but Boost.Python looks much easier.

I am using Boost.Python under OS 10.3.2 with Xcode v1.1 all the time, but I
don't do embedding and I use a SCons-based build system. I'd guess that your
problems are related to differences in the build system, or more specifically
the compilation commands that are issued by the build system. Even more
specifically, it looks like
"-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
is missing. Which build system are you using? Could you post the command line
that leads to the "no such file" errors? If you are using bjam, add "-d2" to
the bjam command line to see the commands that are issued.
Ralf


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/




More information about the Cplusplus-sig mailing list