This shows you the differences between two versions of the page.
works:programmer:cpp:curlpp-and-nlohmann-json [2019/10/12 07:31] Chugreev Eugene создано |
works:programmer:cpp:curlpp-and-nlohmann-json [2019/10/12 07:49] (current) Chugreev Eugene |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Эксперементы с Curlpp и nlohmann/ | ====== Эксперементы с Curlpp и nlohmann/ | ||
- | <code c++> | + | <code bash> |
+ | ruby -e " | ||
+ | brew install nlohmann_json | ||
+ | brew install curlpp | ||
+ | </ | ||
+ | |||
+ | <code text CMakeLists.txt> | ||
+ | cmake_minimum_required(VERSION 3.12) | ||
+ | project(netq) | ||
+ | |||
+ | set(CMAKE_CXX_STANDARD 17) | ||
+ | # find_package(nlohmann_json 3.2.0 REQUIRED) | ||
+ | |||
+ | link_directories(/ | ||
+ | link_directories(/ | ||
+ | |||
+ | find_package(nlohmann_json REQUIRED PATHS / | ||
+ | |||
+ | add_executable(netq main.cpp) | ||
+ | target_link_libraries(netq LINK_PUBLIC curl curlpp nlohmann_json:: | ||
+ | # target_link_libraries(netq PRIVATE nlohmann_json:: | ||
+ | </ | ||
+ | |||
+ | <code c++ main.cpp> | ||
#include < | #include < | ||
#include < | #include < |