JSONCPP to Visual Studio
I am having some trouble getting the JSONCPP Library into Visual Studio.
I have downloaded the library I am just unsure how to import it into my project and use it in my c++ code.
c++visual-studio-2013jsoncpp
shareimprove this question
askedNov 5 '14 at 22:47
blakepeterman88311
show3more comments
1 Answer
activeoldestvotes
1
To fix the error "cannot open include file: 'json/json.h' no such file or directory", you need to add Include directory to your project as following:
-Right click on your project -> Properties. Under C/C++ ->General ->Additional Include Directories, add C:\your-directory-to-jsoncpp-master\include (e.g. C:\user1\jsoncpp-master\include).
相关推荐
adonislu 2020-05-17
linuxalienyan 2011-02-18
baijinswpu 2019-11-09
chinewwen 2011-09-02
abcx 2012-02-08
qianqianxiao 2019-07-01
朴有天虹 2019-06-20
frankwang 2011-07-30
张树刚 2017-04-06
疯狂的扣子 2017-03-13
89281943 2014-08-26
此处省略三千字 2011-06-15
What exactly is the problem? Is it a static library? DLL? Or do you have to compile it yourself?–CameronNov 5 '14 at 22:52
github.com/open-source-parsers/jsoncpp–blakepetermanNov 5 '14 at 22:54
I basically do not know to take this library and use it in c++.–blakepetermanNov 5 '14 at 22:55
2
The documentation is actually quite good -- I suggest following the instructions forgenerating an amalgamated .h & .cpp. Then you can just drop them into your project (
Add->Existing Item
in VS). After that all you need to do is include the header wherever you want to use jsoncpp.–CameronNov 5 '14 at 23:06I did that but I am getting a error: "cannot open include file: 'json/json.h' no such file or directory".–blakepetermanNov 5 '14 at 23:16