Have code in client of API
#include "cpprest/http_msg.h"
...
http_request req;
req.set_method(web::http::methods::POST);
...
During linking have messages:
1>client.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string,class std::allocator > const web::http::methods::GET" (?GET@methods@http@web@@2V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@B)
1>client.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string,class std::allocator > const web::http::methods::POST" (?POST@methods@http@web@@2V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@B)
It is disappear when remove line req.set_method(web::http::methods::POST); As I understand web::http::methods::POST is constant so must builded in client.obj. Do not understand yet.
It is static link. Possible problem with basic_string