TinyCompiler icon indicating copy to clipboard operation
TinyCompiler copied to clipboard

json/json.h: No such file or directory

Open exebook opened this issue 6 years ago • 7 comments

ASTNodes.h:6:23: fatal error: json/json.h: No such file or directory #include <json/json.h>

What I need to install to fix this?

Tried to install those, did not help:

libjson-c-dev
libjsoncpp-dev

exebook avatar Mar 06 '18 06:03 exebook

The libjsoncpp-dev on ubuntu puts the header files in /usr/include/jsoncpp/, instead of /usr/include/ This post may be useful: https://stackoverflow.com/questions/36861355/fatal-error-with-jsoncpp-while-compiling

stardust95 avatar Mar 06 '18 08:03 stardust95

use #include <jsoncpp/json/json.h> instead of the original one.

jiec-msft avatar May 30 '18 07:05 jiec-msft

sudo apt-get install libjsoncpp-dev sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json

seahair avatar Aug 07 '18 06:08 seahair

add -I/usr/include/jsoncpp into CPPFLAGS, or use pkg-config --cflags jsoncpp, that may help with any package manager

pnck avatar Apr 16 '19 08:04 pnck

sudo apt-get install libjsoncpp-dev sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json

only I ran fist line, it fixed the error.

mahdinobar avatar Mar 15 '20 20:03 mahdinobar

sudo apt-get install libjsoncpp-dev sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json

The best (and most elegant) solution so far...

pavelnunez avatar Jun 21 '20 14:06 pavelnunez

Compilation in the docker image doesn't work because of this.

jmakov avatar Feb 24 '23 02:02 jmakov