For the past month I've been looking at WAMP and Autobanh|Cpp and I decided to start experimenting. I've successfully installed Autobahn and cloned Autobahn|Cpp library (and the examples) from this. But there seems to be an issue with building the examples (using Scons). Example call2.cpp relies on Boost composite futures using 'when_all' to wait for either one or all the composed operations to complete before continuing.
From the console output, it seems 'when_all' was not declared:
fguertin@BBBRTH5DEV01:~/Desktop/AutobahnCpp$ scons
scons: Reading SConscript files ...
Using GNU toolchain
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/examples/call2.o -c -std=c++11 -O2 -Wall -pedantic -Wno-deprecate-declarations -Wno-unused-local-typedefs -Wl,--no-as-needed -pthread -I/home/fguertin/boost_1_55_0-x86 -I/home/fguertin/msgpack-c/include -Iautobahn examples/call2.cpp
examples/call2.cpp: In lambda function:
examples/call2.cpp:128:85: error: 'when_all' was not declared in this scope
auto finish = when_all(std::move(c0), std::move(c1), std::move(c2));
^
In file included from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/impl/posix_event.ipp:24:0,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/posix_event.hpp:95,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/event.hpp:25,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/task_io_service_thread_info.hpp:18,
from /home/fguertin/boost_1_55_0-x86/boost/asio/impl/handler_alloc_hook.ipp:26,
from /home/fguertin/boost_1_55_0-x86/boost/asio/handler_alloc_hook.hpp:80,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/handler_alloc_helpers.hpp:21,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/bind_handler.hpp:19,
from /home/fguertin/boost_1_55_0-x86/boost/asio/detail/wrapped_handler.hpp:18,
from /home/fguertin/boost_1_55_0-x86/boost/asio/io_service.hpp:24,
from /home/fguertin/boost_1_55_0-x86/boost/asio/basic_io_object.hpp:19,
from /home/fguertin/boost_1_55_0-x86/boost/asio/basic_socket.hpp:20,
from /home/fguertin/boost_1_55_0-x86/boost/asio/basic_datagram_socket.hpp:20,
from /home/fguertin/boost_1_55_0-x86/boost/asio.hpp:21,
from autobahn/autobahn.hpp:42,
from examples/call2.cpp:31:
I'm just wondering why this is not working and what did I miss.
Your Boost is too old. See here and here. You need at least 1.56.
Also (not necessary, but): do yourself a favor and use a decent compiler;)