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 " > 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
^
/usr/local/include/boost-1_59/boost/function_equal.hpp:22:1: error: template
with C linkage
template
^
$
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?