1

I'm building a crossplateform application and I'm trying to do some network request using cpp-netlib on ios. So far so good, until I use the call back function of cpp-netlib to avoid waiting for an answer (and froze my user interface). But when I tried to compile, I had an error I don't succeed to fix in Xcode.

No member named 'forward' in namespace 'std'

This error come from a deconstruct.hpp file of boost library. How can I fix it ?

I'm already compiling my application using GNU++11 (C++ Language Dialect) and libstdc++ (C++ Standart Library).

edit I fixed the bug of std::forward by compiling with libc++ rather than libstdc++ (which include gnu). But i'm running against several error in boost file again.

If you want to have a look:

    In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:45:48: error: expected a type
        template <typename Car, typename Cdr = fusion::nil>
                                               ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:45:48: error: expected ',' or '>' in template-parameter-list
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:37: error: too few template arguments for class template 'make_cons'
        typedef typename result_of::make_cons<value>::type elements;
                                    ^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
        struct make_cons
               ^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:55: error: expected a qualified name after 'typename'
        typedef typename result_of::make_cons<value>::type elements;
                                                      ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:65:59: error: expected ';' at end of declaration list
        typedef typename result_of::make_cons<value>::type elements;
                                                          ^
                                                          ;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:40: error: use of undeclared identifier 'elements'
                result<make_component_(elements, Data)>::type
                                       ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:58: error: non-friend class member 'type' cannot have a qualified name
                result<make_component_(elements, Data)>::type
                                                       ~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:58: error: typedef declarator cannot be qualified
                result<make_component_(elements, Data)>::type
                                                       ~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:73:62: error: expected ';' at end of declaration list
                result<make_component_(elements, Data)>::type
                                                             ^
                                                             ;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:76:9: error: unknown type name 'result_type'
        result_type operator()(
        ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:37: error: too few template arguments for class template 'make_cons'
        typedef typename result_of::make_cons<value>::type elements;
                                    ^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
        struct make_cons
               ^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:55: error: expected a qualified name after 'typename'
        typedef typename result_of::make_cons<value>::type elements;
                                                      ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:94:59: error: expected ';' at end of declaration list
        typedef typename result_of::make_cons<value>::type elements;
                                                          ^
                                                          ;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:40: error: use of undeclared identifier 'elements'
                result<make_component_(elements, Data)>::type
                                       ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:58: error: non-friend class member 'type' cannot have a qualified name
                result<make_component_(elements, Data)>::type
                                                       ~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:58: error: typedef declarator cannot be qualified
                result<make_component_(elements, Data)>::type
                                                       ~~^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:99:62: error: expected ';' at end of declaration list
                result<make_component_(elements, Data)>::type
                                                             ^
                                                             ;
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:102:9: error: unknown type name 'result_type'
        result_type operator()(
        ^
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:147:28: error: too few template arguments for class template 'make_cons'
                result_of::make_cons<child_component>::type
                           ^
In file included from /Users/paris_j/Speechi/JeLèveLaMain/jllm-ios/jelevelamain/jelevelamain/AppDelegate.m:11:
In file included from ../../jllm-core/include/model/Model.hh:18:
In file included from ../../jllm-core/include/model/NetworkModel.hpp:11:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/client.hpp:13:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/request.hpp:18:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/protocol/http/message/wrappers/uri.hpp:10:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/uri.hpp:359:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/network/uri/accessors.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/meta_compiler.hpp:20:
In file included from /usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/make_component.hpp:17:
/usr/local/Cellar/boost/1.55.0_1/include/boost/spirit/home/support/detail/make_cons.hpp:46:16: note: template is declared here
        struct make_cons
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
bobby
  • 105
  • 1
  • 10
  • looks like duplicate of http://stackoverflow.com/questions/10948355/no-member-named-forward-in-namespace-std – Andrew Selivanov Apr 22 '14 at 13:06
  • I already had a look to that subject. Unfortunately it doesn't solve my problem. – bobby Apr 22 '14 at 13:56
  • You're using `AppDelegate.m` file, i.e. objective-c. If you want to use boost you need objective-c++. Simply rename AppDelegate.m to AppDelegate.mm. –  May 01 '14 at 17:23
  • `nil` is the reserved name in objective-c, so you can't use c++ code which use name `nil`. You need to create C++ file and hide all work with boost in it and leave only C++ interface which don't include boost files. –  May 01 '14 at 17:25
  • I'm already compiling in Objective-C++ – bobby May 04 '14 at 11:15
  • Hi bobby : Could you resolve this error ? I am stuck in the same.. If you could come up with a solution, kindly post it.!! – PRIME Jun 05 '15 at 11:41

0 Answers0