Open GordonEldest opened 5 years ago
Is there already a workaround? I haven't managed to build the cpprustsdk under Windows yet. I get the same build error on tagged version 2.10.14 and master.
Same here. Been trying to get passed this problem for days. The only workaround I found was to install cpprestsdk using the packet manager inside Visual Studio itself, bypassing the whole git cpprestsdk thing. It works as far as being able to build cpprestsdk but none of the examples were built. I've had to manually build ones I need. The suggested "git submodule update --init" does get websocketpp files and puts them under \Release\libs\websocketpp\ but I still get the same error in CMake, using cmake-gui or cmd line CMake.
After the suggested git submodule update --init
you should see:
-- Setting msvc options
-- websocketpp not found, using the embedded version
Running the git update command is not good enough by itself. I had seen that suggestion days ago and it did fetch the websocketpp files however it still fails cmake configure.
That being said, I did finally get all 22 projects to build in VS2019 x64. To get cmake to finally configure right I first ran Configure using the default x64 settings and VS2019 default compiler. It fails to configure as noted before but then in the configure settings I changed "VCPKG_TARGET_TRIPLET" from "x86-windows" to "x64-windows" and manually set WEBSOCKETPP_DIR path and Configured again and it worked. It Generated after that and I was able to open the new cpprestsdk.sln solution and build all (22 projects).
I was using cmake-gui not the command line cmake.
Microsoft, fix your cmake files!
(using CMake-gui 3.15.2)
Running CMAKE 3.10.2 VS2017 win64 Configure start then complains that
-- Setting msvc options CMake Error at cmake/cpprest_find_websocketpp.cmake:14 (message): -- websocketpp not found and embedded version not present; try
git submodule update --init
and run CMake again Call Stack (most recent call first): src/CMakeLists.txt:68 (cpprest_find_websocketpp)Fetching anciliaries projects is OK, but your CMAke instruction should clarify where to put it relative to existing project.
before buiilding the cpprestsdk install websocketpp using vcpkg vcpkg install --triplet x64-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli
Full restcppsdk build guide & source code https://sageai.blogspot.com/2020/12/how-to-build-cpprestsdk-using-vcpkg-in.html
Same issue. Following are setps: (1) Setup vcpkg env: C:\src> git clone https://github.com/microsoft/vcpkg C:\src> vcpkg\bootstrap-vcpkg.bat (2) Get the source of cpprestsdk: git clone https://github.com/Microsoft/cpprestsdk.git (3) Install the dependencies for the platform: vcpkg install --triplet x86-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli vcpkg install --triplet x64-windows zlib openssl boost-system boost-date-time boost-regex boost-interprocess websocketpp brotli (4) Install cpprestsdk X86 and X64 vcpkg install cpprestsdk:x86-windows vcpkg install cpprestsdk:x64-windows (5) Build cpprestsdk project for X86 vcpkg> cd cpprestsdk vcpkg/cpprestsdk> mkdir build.x86v142 vcpkg/cpprestsdk> cd build.x86v142 vcpkg/cpprestsdk/build.x86v142> cmake .. "-DCMAKE_TOOLCHAIN_FILE=d:\vcpkg\scripts\buildsystems\vcpkg.cmake"
Error info:
D:\vcpkg\cpprestsdk\build.x86v142_All>cmake .. "-DCMAKE_TOOLCHAIN_FILE=d:\vcpkg\scripts\buildsystems\vcpkg.cmake"
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 6.1.7601.
-- Setting msvc options
CMake Error at Release/cmake/cpprest_find_websocketpp.cmake:14 (message):
-- websocketpp not found and embedded version not present; try git submodule update --init
and run CMake again
Call Stack (most recent call first):
Release/src/CMakeLists.txt:68 (cpprest_find_websocketpp)
How to fix this issue?
Running CMAKE 3.10.2 VS2017 win64 Configure start then complains that
Fetching anciliaries projects is OK, but your CMAke instruction should clarify where to put it relative to existing project.