dropbox / json11

A tiny JSON library for C++11.
MIT License
2.55k stars 616 forks source link

Buliding for windows? #148

Closed lukkio88 closed 4 years ago

lukkio88 commented 4 years ago

Hi, is it possible to build your json parser on windows?

Here is what I did from the root folder:

mkdir build && cd build
cmake ../ - G "Visual Studio 15 2017 Win64"

The I opened the generated solution in Visual studio and tried to build, both Debug and Release mode, and I get

1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>Checking Build System
2>------ Build started: Project: json11, Configuration: Release x64 ------
2>Building Custom Rule C:/Projects/ai-content-creation/third_party/json11/CMakeLists.txt
2>cl : Command line error D8021: invalid numeric argument '/Wextra'
2>Done building project "json11.vcxproj" -- FAILED.
3>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
3>Building Custom Rule C:/Projects/ai-content-creation/third_party/json11/CMakeLists.txt
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Namely the error is 2>cl : Command line error D8021: invalid numeric argument '/Wextra', is there a way for me to work around the problem?

artwyman commented 4 years ago

That sounds like an issue specific to the compiler or cmake build. FWIW, json11 is portable code so it should be possible to build it with the Microsoft compiler, but I can't say what the right settings are.