首先要 git clone这个库
git clone git://github.com/Microsoft/cpprestsdk.git
然后git 一下 Vcpkg
.vcpkgootstrap-vcpkg.bat
.vcpkgvcpkg integrate install
并安装依赖
32位
.vcpkgvcpkg install --triplet x86-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli
64位
.vcpkgvcpkg install --triplet x64-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli
然后去到
Releaselibs git 一下 zaphoyd/websocketpp
cd Release
cd libs
git clone git://github.com/zaphoyd/websocketpp.git
完成后再cmake了
退到根目录下面
32位mkdir buildx86v141
cd
buildx86v141
cmake ../Release -A Win32 -DCMAKE_TOOLCHAIN_FILE=/REPLACE_THIS_WITH_PATH_TO/vcpkg/scripts/buildsystems/vcpkg.cmake
REPLACE_THIS_WITH_PATH_TO改成你自己cpprestsdk根目录下面的目录就可以,就能生成VS 的项目文件,然后编译就可以了
64位
如果编译64位改成如下
mkdir buildx64v141
cd
buildx64v141
cmake ../Release -A x64 -DCMAKE_TOOLCHAIN_FILE=/REPLACE_THIS_WITH_PATH_TO/vcpkg/scripts/buildsystems/vcpkg.cmake