Skip to content

Build with VS 2019 on Windows

Victor Angelier CCX edited this page May 7, 2020 · 1 revision
  1. Open Visual Studio developer command prompt

Visual Studio 2019 Developer Command Prompt v16.5.4

<C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>

  1. Execute: vcvarsall.bat
  2. mkdir -p build
  3. cd build
  4. cmake -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF ..
  5. cmake --build . --config Release | Debug
  6. Copy lib\Release | lib\Debug to your project source folder
  7. Copy include\json to your project source folder
  8. 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"
Clone this wiki locally