[C++-sig] warning: "_POSIX_C_SOURCE" redefined

Paul F. Kunz Paul_Kunz at slac.stanford.edu
Fri Jun 11 01:27:57 CEST 2004


>>>>> On Thu, 10 Jun 2004 10:59:31 -0700 (PDT), "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> said:

> Surely recent enough that there is hope that some developer will
> listen. Now we need a volunteer to

> 1. Reduce the problem. I.e. strip down the includes to a
> minimum. I'd expect the critial point to be in
> boost/python/detail/prefix.hpp. See the comment in there.

   Here goes...

foo.cxx ...
----
#include "boost/python.hpp"

int main ()
{
  return 0;
}
----

compile with

g++  -c foo.cxx -I/usr/local/include/boost-1_31 -I/usr/local/include/python2.3 -ftemplate-depth-60

Results are...

cd /u/ek/pfkeb/home/temp/
g++  -c foo.cxx -I/usr/local/include/boost-1_31 -I/usr/local/include/python2.3 -ftemplate-depth-60
In file included from /usr/local/include/python2.3/Python.h:8,
                 from /usr/local/include/boost-1_31/boost/python/detail/wrap_python.hpp:121,
                 from /usr/local/include/boost-1_31/boost/python/detail/prefix.hpp:13,
                 from /usr/local/include/boost-1_31/boost/python/args.hpp:9,
                 from /usr/local/include/boost-1_31/boost/python.hpp:12,
                 from foo.cxx:1:
/usr/local/include/python2.3/pyconfig.h:847: warning: `_POSIX_C_SOURCE' redefined
/usr/include/features.h:171: warning: this is the location of the previous definition

Compilation finished at Thu Jun 10 16:24:24




More information about the Cplusplus-sig mailing list