我正在构建一个crossplateform应用程序,我正在尝试使用ios上的cpp-netlib进行一些网络请求。到目前为止一直很好,直到我使用cpp-netlib的回调函数来避免等待答案(并冻结我的用户界面)。 但是当我尝试编译时,我遇到了一个错误,我没有成功修复Xcode。
名称空间'std'
中没有名为'forward'的成员
此错误来自boost库的deconstruct.hpp文件。我该如何解决?
我已经使用GNU ++ 11(C ++语言方言)和libstdc ++(C ++标准库)编译我的应用程序。
修改 我通过使用libc ++而不是libstdc ++(包括gnu)编译来修复std :: forward的错误。但是我再次在boost文件中遇到了几个错误。
如果你想看看:
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=]