Compilation error with Boost


#1

I’m trying to add some libraries from Boost (1.66) to oF.

So far, in config.make I’ve only added:

PROJECT_LDFLAGS=-Wl,-rpath=./libs -L/usr/local/lib/ -lboost_system

and then included the ASIO header in the oF app header file. Compilation gives me this error:

In file included from /usr/local/include/boost/asio/impl/write.hpp:25:0,
                 from /usr/local/include/boost/asio/write.hpp:927,
                 from /usr/local/include/boost/asio/buffered_write_stream.hpp:29,
                 from /usr/local/include/boost/asio/buffered_stream.hpp:22,
                 from /usr/local/include/boost/asio.hpp:41,
                 from /home/virtual/Documents/openFrameworks-master/apps/myApps/01/src/ofApp.h:4,
                 from /home/virtual/Documents/openFrameworks-master/apps/myApps/01/src/main.cpp:2:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp: In member function ‘boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepared_buffers_type boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepare(std::size_t)’:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:50: error: parse error in template argument list
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                  ^
In file included from /usr/local/include/boost/asio/impl/write.hpp:25:0,
                 from /usr/local/include/boost/asio/write.hpp:927,
                 from /usr/local/include/boost/asio/buffered_write_stream.hpp:29,
                 from /usr/local/include/boost/asio/buffered_stream.hpp:22,
                 from /usr/local/include/boost/asio.hpp:41,
                 from /home/virtual/Documents/openFrameworks-master/apps/myApps/01/src/ofApp.h:4,
                 from /home/virtual/Documents/openFrameworks-master/apps/myApps/01/src/ofApp.cpp:1:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp: In member function ‘boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepared_buffers_type boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepare(std::size_t)’:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:50: error: parse error in template argument list
     while (next != end && max_size > 0 && result.count < result.max_buffers)

I’ve also tried to add the BOOST_ALL_NO_LIB according to this but with no luck.

Has anyone else been able to add Boost to a project?

System:
Linux Mint Mate 17.3 (x64; VirtualBox)
GCC version 5.4.0
i5-7200u (2 threads in VBox)