[C++-sig] Re: wrap_python.hpp errors on Mac OS X
James Mastro
jmastro at rochester.rr.com
Mon Apr 12 21:01:12 CEST 2004
On Apr 10, 2004, at 11:44 AM, Ralf W. Grosse-Kunstleve wrote:
> I got a lot of stuff to work under Mac OS X. I had to do only a few
> strange
> things, like adding dummy member data, but eventually everything
> worked. I
> don't think there is a reason to give up that quickly. Why don't you
> tell us
> exactly what you are trying to do. More often than not there is an
> alternative
> route that gets you around compiler-specific problems.
Oh, I didn't give up. I think the problem is with Apple's Objective-C++
compiler (used for compiling Objective C and C++ in the same file,
which I use only for using Cocoa with C++ code). This causes some
compile errors in files that python.hpp includes:
/usr/bin/gcc-3.3 -x objective-c++ ... // compile Objective-C++
#include <boost/python.hpp> // errors
This works fine:
/usr/bin/gcc-3.3 -x c++ ... // compile C++
#include <boost/python.hpp> // just a warning about long double's
size possibly changing in the future
It looks like the Objective-C++ compiler is broken. So as long as I
don't kick in the Objective-C++ compiler on any file that is including
the boost python header, I'm OK. Not a major loss. The strange thing
about this is _I was not doing that_. This is in platform independent
code of mine. The file in question is just a .cpp file and should never
have been seeing any Objective-C++ related stuff other than that
#include <Cocoa/Cocoa.h> was in a precomp, but that should not have
been used in a C++ file. Having it there now causes no problems. What
finally got me to what I think is the solution is turning off the
precompiled header. Then not only cleaning the project from within
Xcode but going and actually trashing all "intermediate" files on disk.
I need to look into that more.
Thanks for your help. Without you saying you actually had it working, I
probably would have just looked into other options. Now on to actually
USING what I've finally successfully #include'd...
-jim
More information about the Cplusplus-sig
mailing list