[C++-sig] warning: "_POSIX_C_SOURCE" redefined
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Thu Jun 10 16:38:12 CEST 2004
I can reproduce the warning... but only after removing the -w from the g++
command line.
With g++ I am always compiling with -w because I get useless warnings otherwise
that I cannot disable with other switches. I rely on EDG compilers to check my
code for standard conformance; for this purpose the EDG compilers generally do
a much better job than g++.
If you don't want to use -w (I don't know how to tell bjam to insert the -w)
you have to analyze how exactly the conflicting definitions of _POSIX_C_SOURCE
come about. Maybe we can do something with #ifdef in the right places. However,
I doubt it is worth the effort unless you can demonstrate the same problem on a
more recent platform with a more recent compiler.
Ralf
--- Pere Mato Vila <Pere.Mato at cern.ch> wrote:
> Linux Redhad 7.3 with gcc 3.2
>
>
> > -----Original Message-----
> > From: c++-sig-bounces at python.org
> > [mailto:c++-sig-bounces at python.org] On Behalf Of Ralf W.
> > Grosse-Kunstleve
> > Sent: 09 June 2004 21:10
> > To: Development of Python/C++ integration
> > Subject: RE: [C++-sig] warning: "_POSIX_C_SOURCE" redefined
> >
> >
> > --- Pere Mato Vila <Pere.Mato at cern.ch> wrote:
> > > My test program to show the problem contains only one line:
> > >
> > > #include "boost/python.hpp"
> > >
> > > and therefore I can not move it before anything.
> >
> > Hm. What is your platform? Linux (which), Cygwin?
> >
> >
> > > > -----Original Message-----
> > > > From: c++-sig-bounces at python.org
> > > > [mailto:c++-sig-bounces at python.org] On Behalf Of Ralf W.
> > > > Grosse-Kunstleve
> > > > Sent: 08 June 2004 12:26
> > > > To: Development of Python/C++ integration
> > > > Subject: Re: [C++-sig] warning: "_POSIX_C_SOURCE" redefined
> > > >
> > > >
> > > > --- Pere Mato Vila <Pere.Mato at cern.ch> wrote:
> > > > > I am having the following compilation warnings when including
> > > > > "boost/python.hpp". I am using Boost 1.31.0 Python 2.3.3
> > > > and gcc 3.2.
> > > > > Is anything I am doing wrong?
> > > >
> > > > Due to a Python requirement the boost/python.hpp header has
> > > > to be included before any system header. Please move the
> > > > python.hpp include to the very top of your file. Let us know
> > > > if it doesn't help. Ralf
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
More information about the Cplusplus-sig
mailing list