rsocket-cpp 編譯
項目地址github地址
https://github.com/rsocket/rsocket-cpp
編譯使用vcpkg庫管理器
前提
- 安裝並且使用vcpkg
- Windows 使用Visual Studio 2017
安裝依賴庫
-
macos
vcpkg install folly:x64-osx vcpkg install fmt:x64-osx
-
ubuntu
vcpkg install folly:x64-linux vcpkg install fmt:x64-linux
-
windows
vcpkg install folly:x64-windows vcpkg install fmt:x64-windows
MacOS編譯
-
替換自己安裝的vcpkg路徑
-
默認會安裝到/usr/local/include , /usr/local/lib
git clone https://github.com/rsocket/rsocket-cpp.git cd rsocket-cpp mkdir release cd release cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/Users/maohuawei/dev/vcpkg/scripts/buildsystems/vcpkg.cmake ../ make make install
Ununtu
-
替換自己安裝的vcpkg路徑
-
默認會安裝到/usr/local/include , /usr/local/lib
git clone https://github.com/rsocket/rsocket-cpp.git cd rsocket-cpp mkdir release cd release cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/Users/maohuawei/dev/vcpkg/scripts/buildsystems/vcpkg.cmake ../ make make install
Windows
git clone https://github.com/rsocket/rsocket-cpp.git
下載項目後,使用Visual Studio 2019 打開
注意,可以使用Visual Studio 2019 編譯,也可以使用Visual Studio 2017 編譯,但是 generator 只能使用 Visual Studio 15 2017 Win64
在CMakeLists.txt 頭部添加
find_package(zlib)
命令行 error D8021: 無效的數值參數“/Wno-unreachable-code”