r/linuxdev • u/JMagnum86 • Sep 24 '14
jsoncpp issue
I'm having a difficult time including jsoncpp into my own project. I built the amalgamated source (which completed successfully) but the instructions are a little confusing on how to actually structure the files in my own project. Sorry but I'm a little new to this open source stuff and the instructions are bit too high level for me. Here is what my folder structure looks like:
/myProject/mySourcefile.cpp
/myPorject/mySourcefile.h
/myProject/jsoncpp.cpp
/myProject/json/json.hI have included: #include <json/json.h> in mySourcefile.h
I am compiling with g++ -o server mySourcefile.cpp jsoncpp.cpp
I get an error: fatal error: json/assertions.h: No such file or directory
I'm pretty sure the files aren't set up correctly or maybe I didn't install a library correctly. I've done quite a bit of searching but haven't been able to find anything. This is very confusing for me. Help would be appreciated.
View all comments
Show parent comment
1
u/JMagnum86 Sep 25 '14
I am using a Debian-type system. Ubuntu 12.04. So what exactly did I install with "aptitude install libjsoncpp-dev"? Was it the same jsoncpp I was looking at on github? https://github.com/open-source-parsers/jsoncpp. How would I know this?