[C++-sig] "_POSIX_C_SOURCE" redefined
Andreas Beyer
beyer at imb-jena.de
Thu Apr 7 23:42:01 CEST 2005
Hi,
I keep getting the "_POSIX_C_SOURCE" redefined warning when compiling my
own project with BJAM.
The problem was described in:
http://mail.python.org/pipermail/c++-sig/2005-February/008564.html
In my case the examples get compiled without a warning, but my own
project causes the warning:
gcc-C++-action
bin/csrc/network.so/gcc/release/shared-linkable-true/network.o
In file included from
/cellar/users/abeyer/boost/boost_current/boost/python/detail/wrap_python.hpp:30,
from
/cellar/users/abeyer/boost/boost_current/boost/python/detail/prefix.hpp:13,
from
/cellar/users/abeyer/boost/boost_current/boost/python/args.hpp:8,
from
/cellar/users/abeyer/boost/boost_current/boost/python.hpp:11,
from property_handle.hpp:16,
from node.hpp:26,
from connection.hpp:18,
from network.cpp:13:
/cellar/users/abeyer/include/python2.4/pyconfig.h:835:1: warning:
"_POSIX_C_SOURCE" redefined
In file included from
/usr/include/c++/3.2.3/i386-redhat-linux/bits/os_defines.h:39,
from
/usr/include/c++/3.2.3/i386-redhat-linux/bits/c++config.h:34,
from /usr/include/c++/3.2.3/string:45,
from connection.hpp:15,
from network.cpp:13:
/usr/include/features.h:131:1: warning: this is the location of the
previous definition
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?
Thanks!!
Andreas
More information about the Cplusplus-sig
mailing list