Ich habe strikt befolgt diese Dokumentation zu installieren und jsoncpp Bibliothek in meinem Projekt zu verwenden: jsoncpp READMEWie verwende ich JSON-CPP?
Aber ich habe immer noch das Problem mit meiner Sammlung:
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 terminated.
Es ist passiert, wenn ich versuche zu verwenden #include <json/json.h>
Hier ist mein Linux MAKE:
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
Dank für dich helfen.
Der Abschnitt "Building/Testing" (aus der README, mit dem Sie verlinkt sind) weist Sie an, die 'python scons.py platform = Ihre Plattform-here' zu verwenden, um die Bibliothek zu erstellen, aber Sie zeigen ein' Makefile' . Ist das Build-Skript, das Sie für Ihre Anwendung oder für die 'jsoncpp'-Bibliothek veröffentlicht haben? –