Cannot install amalgamated jsoncpp in MFC application
I tried to install the amalgamated version of jsoncpp by pasting json.h, json-forwards.h to the Header files folder and jsoncpp.cpp to the Source files folder and even included the "include" folder in the project properties. Basically installed it the recommended way, but I kept getting:
jsoncpp.cpp(2492,1): warning C4005: 'ALIGNAS': macro redefinition jsoncpp.cpp(2490): message : see previous definition of 'ALIGNAS' jsoncpp.cpp(4113,1): warning C4005: 'isnan': macro redefinition jsoncpp.cpp(4099): message : see previous definition of 'isnan' jsoncpp.cpp(4118,1): warning C4005: 'isfinite': macro redefinition jsoncpp.cpp(4103): message : see previous definition of 'isfinite' jsoncpp.cpp(4130,1): warning C4005: 'isfinite': macro redefinition jsoncpp.cpp(4118): message : see previous definition of 'isfinite' jsoncpp.cpp(4138,1): warning C4005: 'isfinite': macro redefinition jsoncpp.cpp(4130): message : see previous definition of 'isfinite' jsoncpp.cpp(4145,1): warning C4005: 'isnan': macro redefinition jsoncpp.cpp(4113): message : see previous definition of 'isnan' jsoncpp.cpp(4150,1): warning C4005: 'isfinite': macro redefinition jsoncpp.cpp(4138): message : see previous definition of 'isfinite' jsoncpp.cpp(5343,1): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "pch.h"' to your source?
I also have tried following what the last error told me to do and added "#include "pch.h"" in the jsoncpp.cpp file but instead of getting the above I got:
jsoncpp.cpp(843,47): warning C4003: not enough arguments for function-like macro invocation 'max' jsoncpp.cpp(843,47): error C2589: '(': illegal token on right side of '::' soncpp.cpp(843): error C2062: type 'unknown-type' unexpected jsoncpp.cpp(843,52): error C2059: syntax error: ')' jsoncpp.cpp(845,5): error C2181: illegal else without matching if jsoncpp.cpp(1895,47): warning C4003: not enough arguments for function-like macro invocation 'max' jsoncpp.cpp(1895,47): error C2589: '(': illegal token on right side of '::' jsoncpp.cpp(1895): error C2062: type 'unknown-type' unexpected jsoncpp.cpp(1895,52): error C2059: syntax error: ')' jsoncpp.cpp(1897,5): error C2181: illegal else without matching if
Does anybody know if there's actually any way to use amalgamated jsoncpp in an MFC Application? I've been dealing with this for 2 days and it'd be very much appreciated