|
Boost Users : |
Subject: [Boost-users] Using boost on AIX with GCC
From: Chris Franz (cfranz_at_[hidden])
Date: 2015-11-09 17:28:18
I'm trying to get started using boost on AIX with GCC. What I seem to be
running into is that GCC has a "feature" on AIX such that system headers are
wrappered with an implicit 'extern "C"'. I'm not finding a good way to
include the boost headers because of this feature.
As an example, using about the simplest boost header I could find:
$ echo "#include <boost/function_equal.hpp>" > fe.cpp
$ g++ fe.cpp -c -isystem/usr/local/include/boost-1_59
In file included from fe.cpp:1:0:
/usr/local/include/boost-1_59/boost/function_equal.hpp:15:1: error: template
with C linkage
template<typename F, typename G>
^
/usr/local/include/boost-1_59/boost/function_equal.hpp:22:1: error: template
with C linkage
template<typename F, typename G>
^
$
One obvious possibility is to use -I instead of -isystem, but not treating
boost headers as system headers results in a multitude of warnings using the
verbosity we like to use (I've even run into some boost headers that emit
errors if -pedantic-errors is specified).
Do I need a different version of gcc and/or boost? How do other people
configure this?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net