Help with building Autobahn|Cpp examples

#1

Hi all,

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 some examples (using Scons). In fact, 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.

Note: I posted this question earlier on Stack Overflow at [http://stackoverflow.com/questions/27781769/autobanhcpp-and-boostwhen-all-composite-futures
](http://stackoverflow.com/questions/27781769/autobanhcpp-and-boostwhen-all-composite-futures)
0 Likes

#2

Hi François,

pls see my answer http://stackoverflow.com/a/27785946/884770

You will need Boost 1.56+

Cheers,
/Tobias

···

Am 05.01.2015 um 18:24 schrieb François Guertin:

Hi all,

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
<http://autobahn.ws/cpp/#download>. But there seems to be an issue with
building some examples (using Scons). In fact, example call2.cpp
<https://github.com/tavendo/AutobahnCpp/blob/master/examples/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:ReadingSConscriptfiles ...
UsingGNU toolchain
scons:donereading SConscriptfiles.
scons:Buildingtargets ...
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 -Iautobahnexamples/call2.cpp
examples/call2.cpp:Inlambdafunction:
examples/call2.cpp:128:85:error:'when_all'was notdeclared inthisscope
autofinish =when_all(std::move(c0),std::move(c1),std::move(c2));
^
Infile 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,
fromautobahn/autobahn.hpp:42,
fromexamples/call2.cpp:31:
>

I'm just wondering why this is not working and what did I miss.|

Note: I posted this question earlier on Stack Overflow athttp://stackoverflow.com/questions/27781769/autobanhcpp-and-boostwhen-all-composite-futures
>

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com
<mailto:autobahnws+...@googlegroups.com>.
To post to this group, send email to autob...@googlegroups.com
<mailto:autob...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/autobahnws/fe887f7e-2736-4b46-8982-343b21f702b2%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/fe887f7e-2736-4b46-8982-343b21f702b2%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes