I was successfully built a cpprestsdk latest version 2.10.18 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<wchar_t>,class std::allocator<wchar_t> > 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 didn't link a external library even I tried to do something in my project like
C++ -> Preprocessor definitions, add _NO_ASYNCRTIMP even "_NO_PPLXIMP"
Linker -> Input and added cpprest141_2_10d.lib(debug) or cpprest141_2_10.lib(Release)
in the VS editor section I added
#pragma comment(lib, "bcrypt.lib")
#pragma comment(lib, "winhttp.lib")
#pragma comment(lib, "crypt32.lib")
it doesn't work anyway 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
any idea? thank you so much
update:
I gonna elaborate how did I build the cpprestsdk
the way which M$ recommended https://github.com/microsoft/cpprestsdk/wiki/How-to-build-for-Windows was totally NOT working, the way of another bloger https://sageai.blogspot.com/2020/12/how-to-build-cpprestsdk-using-vcpkg-in.html just was able to build the debug library only, not release library though, I tried the way below, it works for me
#1 git clone the library source
git clone https://github.com/Microsoft/cpprestsdk.git
#2 install vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg integrate install
#3 download the dependency libraries I was tried to build 32-bits library,that's why I downloaded 32 bit libraries
.\vcpkg\vcpkg install --triplet x86-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli
#4 git the websocketpp,I'm NOT that too familar with CPP & cmake,that's why I have to git the websocketpp source to websocketpp folder, to make sure cmake was able to find websocketpp, what I doing was
cd Release
cd libs
git clone git://github.com/zaphoyd/websocketpp.git
#5 everything has been ready, we can cmake the project,then I built a folder for the VS project files
mkdir build.x86v141
cd build.x86v141
cmake ../Release -A Win32 -DCMAKE_TOOLCHAIN_FILE=/REPLACE_THIS_WITH_PATH_TO/vcpkg/scripts/buildsystems/vcpkg.cmake
afterward , I did see the VS project files were generated, then I opened it and built them, that's all