TinyCompiler
TinyCompiler copied to clipboard
json/json.h: No such file or directory
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
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
use #include <jsoncpp/json/json.h> instead of the original one.
sudo apt-get install libjsoncpp-dev sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json
add -I/usr/include/jsoncpp into CPPFLAGS
, or use pkg-config --cflags jsoncpp
, that may help with any package manager
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.
sudo apt-get install libjsoncpp-dev sudo ln -s /usr/include/jsoncpp/json/ /usr/include/json
The best (and most elegant) solution so far...
Compilation in the docker image doesn't work because of this.