[C++-sig] "_POSIX_C_SOURCE" redefined
Lothar Werzinger
lothar at xcerla.com
Fri Apr 8 00:58:06 CEST 2005
On Thursday 07 April 2005 15:29, Ralf W. Grosse-Kunstleve wrote:
> --- Andreas Beyer <beyer at imb-jena.de> wrote:
> > Since examples work, I guess I am doing something wrong, but I can't
> > figure out what. I tried different orderings of the includes in
> > property_handle.hpp. I tried #include <boost/python.hpp> first, before
> > the standard library includes (like <string> etc.) and I tried including
> > first the std-lib includes and including boost/python.hpp afterwards.
> > Neither worked.
> > So which ordering is correct? What do I have to look at?
>
> #include <boost/python.hpp>
>
> should be at the very top of your wrapper code.
And even that may not be enough. We use boost::python and log4cplus and
unfortunately log4cplus also defines some macros that conflict with macros
previously defined in pythons headers. The only sane way for the probme is
that the developers of Python (and log4cplus) fix their headers.
/opt2/log4cplus/include/log4cplus/config.h:79:1: warning: "HAVE_STAT"
redefined
In file included from /opt2/python-2.4/include/python2.4/Python.h:55,
from /opt2/boost/include/boost-1_32/boost/python/detail/wrap_python.hpp:121,
from /opt2/boost/include/boost-1_32/boost/python/detail/prefix.hpp:13,
from /opt2/boost/include/boost-1_32/boost/python/args.hpp:8,
from /opt2/boost/include/boost-1_32/boost/python.hpp:11,
from src/utility/PythonInterpreterGuard.h:10,
from src/rating/test/PythonRatingStepTest.cpp:10:
/opt2/python-2.4/include/python2.4/pyport.h:139:1: warning: this is the
location of the previous definition
Lothar
--
Lothar Werzinger Dipl.-Ing. Univ.
framework & platform architect
Xcerla Corporation
275 Tennant Avenue, Suite 202
Morgan Hill, Ca 95037
email: lothar at xcerla.com
phone: +1-408-776-9018
More information about the Cplusplus-sig
mailing list