I strictly followed this documentation to install and use the jsoncpp library in my project: jsoncpp README
But I still have this problem with my compilation:
g ++ -W -Wall -Werror -c -o src / ModConnection.o src / ModConnection.cpp src / ModConnection.cpp: 15:23: fatal error: json / json.h: no such file or directory compilation completed.
This happens when I try to use #include <json/json.h>
Here is my Linux MAKEFILE:
CXX = g++
NAME = bin/server
SRCS = ./src/ModConnection.cpp\
./src/unixNetwork.cpp
OBJS = $(SRCS:.cpp=.o)
CXXFLAGS += -W -Wall -Werror
LDFLAGS = -L ./src/jsoncpp-src-0.5.0/buildscons/linux-gcc4.5.1/src/lib_json/libjson_linux-gcc-4.5.1_libmt.a -I src/jsoncpp-src-0.5.0/include
RM = rm -f
$(NAME) : $(OBJS)
$(CXX) $(LDFLAGS) -o $(NAME) $(OBJS)
all : $(NAME)
clean :
$(RM) $(OBJS)
fclean : clean
$(RM) $(NAME)
re : fclean all
.PHONY : all clean fclean re
Thanks for the help.
source
share