官术网_书友最值得收藏!

How to generate projects for Visual Studio 2017

Do the following in order to generate Visual Studio 2017 projects to target the x86 platform:

  1. Open a command prompt and go to the build directory in the source code root folder.
  2. 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
  1. 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. \).

主站蜘蛛池模板: 崇明县| 金川县| 衡南县| 大洼县| 富顺县| 巴楚县| 广灵县| 凤阳县| 尚志市| 景德镇市| 曲松县| 荥经县| 柘城县| 双辽市| 卢湾区| 桃园县| 宾川县| 淮北市| 准格尔旗| 德令哈市| 大化| 新乡市| 壤塘县| 长岭县| 湘潭县| 孟村| 措勤县| 青神县| 都匀市| 安达市| 青浦区| 彭水| 濉溪县| 阳新县| 临沂市| 东源县| 高平市| 德兴市| 永嘉县| 定远县| 土默特右旗|