- The Modern C++ Challenge
- Marius Bancila
- 168字
- 2021-06-25 22:01:20
How to generate projects for Visual Studio 2017
Do the following in order to generate Visual Studio 2017 projects to target the x86 platform:
- Open a command prompt and go to the build directory in the source code root folder.
- Execute the following CMake command:
cmake -G "Visual Studio 15 2017" .. -DCMAKE_USE_WINSSL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_LIBRARY=libcurl -DCURL_INCLUDE_DIR=..\libs\curl\include -DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF -DUSE_MANUAL=OFF
- After completion, the Visual Studio solution can be found at build/cppchallenger.sln.
If you want to target the x64 platform instead, use the generator called "Visual Studio 15 2017 Win64". Visual Studio 2017 15.4 supports both filesystem (as an experimental library) and std::optional. If you use a previous version, or just want to use the Boost libraries instead, you can generate the projects using the following command, after you properly install Boost:
cmake -G "Visual Studio 15 2017" .. -DCMAKE_USE_WINSSL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_LIBRARY=libcurl -DCURL_INCLUDE_DIR=..\libs\curl\include -DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF -DUSE_MANUAL=OFF -DBOOST_FILESYSTEM=ON -DBOOST_OPTIONAL=ON -DBOOST_INCLUDE_DIR=<path_to_headers> -DBOOST_LIB_DIR=<path_to_libs>
Make sure that the paths to the headers and static library files do not include trailing backslashes (i.e. \).
推薦閱讀
- Clojure Programming Cookbook
- Learning Scala Programming
- Node.js+Webpack開發實戰
- 自然語言處理實戰:預訓練模型應用及其產品化
- Rust實戰
- ASP.NET動態網頁設計教程(第三版)
- Visual C++串口通信技術詳解(第2版)
- Mastering AndEngine Game Development
- Oracle 18c 必須掌握的新特性:管理與實戰
- Unity 2018 Shaders and Effects Cookbook
- Scratch·愛編程的藝術家
- Python數據可視化之美:專業圖表繪制指南(全彩)
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Arduino機器人系統設計及開發
- 3ds Max瘋狂設計學院