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

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. \).

主站蜘蛛池模板: 绥棱县| 平利县| 界首市| 葫芦岛市| 商水县| 灌云县| 长乐市| 昔阳县| 合山市| 江永县| 东至县| 阿坝| 龙里县| 肥城市| 宁强县| 郯城县| 贺兰县| 全州县| 如皋市| 双柏县| 东至县| 泸水县| 和平区| 礼泉县| 黄山市| 廉江市| 天气| 丰都县| 宿迁市| 锡林浩特市| 阿图什市| 项城市| 榕江县| 普兰店市| 驻马店市| 潞西市| 革吉县| 佛坪县| 清涧县| 达日县| 河北省|