Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json/json.h: No such file or directory #2

Open
exebook opened this issue Mar 6, 2018 · 7 comments
Open

json/json.h: No such file or directory #2

exebook opened this issue Mar 6, 2018 · 7 comments

Comments

@exebook
Copy link

exebook commented Mar 6, 2018

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
@stardust95
Copy link
Owner

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

@jiec-msft
Copy link

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

@seahair
Copy link

seahair commented Aug 7, 2018

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

@pnck
Copy link

pnck commented Apr 16, 2019

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

@mahdinobar
Copy link

mahdinobar commented Mar 15, 2020

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.

@pavelnunez
Copy link

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

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

@jmakov
Copy link

jmakov commented Feb 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants