microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.66k forks source link

Question : I have built the cpprestsdk with VS 2017, but it has Unresolved external symbol errors #1607

Open ghost opened 3 years ago

ghost commented 3 years ago

I was successfully built a cpprestsdk latest version which I saw the cpprest141_2_10d.lib was on \Binaries\Debug folder and cpprest141_2_10.lib was on \Binaries\Release as well , but it has a problem when I tried to use it it says dgsbnewapitest.obj : error LNK2001: unresolved external symbol "public: static class std::basic_string<wchar_t,struct std::char_traits,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) fatal error LNK1120: 1 unresolved externals I have no idea how to deal with issue, it just looks like lack a external library even I tried to do something in my project like

C++ -> Preprocessor definitions, add _NO_ASYNCRTIMP Linker -> Input and added cpprest141_2_10d.lib(debug) or cpprest141_2_10.lib(Release)

in the VS code editor section I added

pragma comment(lib, "bcrypt.lib")

pragma comment(lib, "winhttp.lib")

pragma comment(lib, "crypt32.lib")

update: I have uploaded the binary-file which the libraries I have been built down here below https://github.com/abcdefghi123456jk/cpprestsdk-binary/releases/tag/2.10.18 please take a look at it it doesn't work , any idea? thank you so much