-2

I downloaded jsoncpp library on a macport. I would like to use the json.h and value.h files, but when I type

#include <jsoncpp/json/value.h>

or

#include <jsoncpp/json/json.h>

it says "please update your includePath".

I found the file where the includePath section is located in. It is in the c_cpp_properties.json file.

Can someone explain how to write the includePath section for the jsoncpp library that is located in a macport?

rioV8
  • 24,506
  • 3
  • 32
  • 49
solo
  • 1
  • 1
  • No one can tell you how to do this unless you tell us where you installed jsoncpp, c_cpp_preoperties requires a *path*. something like `/user/john/macports` (don't take that literally, I just made it up). If you can tell us with path you installed jsoncpp on, then someone will be able to tell you what you need to add to c_cpp_properties.json – john Aug 19 '23 at 05:22
  • I assume you've read the documentation? https://code.visualstudio.com/docs/languages/cpp – Alan Birtles Aug 19 '23 at 05:38
  • why put `jsoncpp` as part of the `#include` path – rioV8 Aug 19 '23 at 09:26
  • are you able to compile the program, you have to use the same path – rioV8 Aug 19 '23 at 09:29
  • I would like to use jsoncpp as part of my project. In my Mac terminal, I typed "port contents jsoncpp" and I got a list of things that the port contains. And one of them for example was "/opt/local/include/json/json.h". Is this the path? I tried putting this include path and it didn't work. – solo Aug 20 '23 at 19:26

0 Answers0