Using boost on AIX with GCC

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?

Hi, have a look at this: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01971.html You might try to apply the attached patch. AS
participants (2)
-
Alberto Santini
-
Chris Franz