mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-08-22 03:16:11 -04:00
1
Build with VS 2019 on Windows
Victor Angelier CCX edited this page 2020-05-07 09:38:10 +02:00
- Open Visual Studio developer command prompt
Visual Studio 2019 Developer Command Prompt v16.5.4
<C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>
Execute: vcvarsall.bat
mkdir -p build
cd build
cmake -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF ..
cmake --build . --config Release | Debug
- Copy lib\Release | lib\Debug to your project source folder
- Copy include\json to your project source folder
- Add the following macro to your project
#ifdef _DEBUG #pragma comment(lib, "json/jsoncpp_debug.lib") #else #pragma comment(lib, "json/jsoncpp.lib") #endif #include "json/json.h"