我尝试在 Eclipse 上使用 ubuntu 使用 cpp REST sdk。我将所需的头文件添加到usr/local/includes
. 当我尝试构建以下代码时,会出现一些错误。
#include <cpprest/http_listener.h>
#include <cpprest/json.h>
#include <iostream>
using namespace std;
using namespace web;
using namespace web::http;
using namespace web::http::experimental::listener;
int main() {
http_listener listner(L"http://localhost/restdemo");
return 0;
}
这些是一些错误。
trying to instantiate ‘template<class _Function> pplx::cancellation_token_registration pplx::cancellation_token::register_callback(const _Function&) const’ CheckRest line 6306, external location: /usr/local/include/pplx/pplxtasks.h C/C++ Problem
trying to instantiate ‘template<class _Function> pplx::cancellation_token_registration pplx::cancellation_token::register_callback(const _Function&) const’ CheckRest line 996, external location: /usr/local/include/pplx/pplxcancellation_token.h C/C++ Problem
trying to instantiate ‘template<class T> void pplx::details::_CancellationTokenState::TokenRegistrationContainer::for_each(T)’ CheckRest line 451, external location: /usr/local/include/pplx/pplxcancellation_token.h C/C++ Problem