简体   繁体   English

用jsoncpp链接问题

[英]Linking problems with jsoncpp

I'm trying to use the amalgamated version of jsoncpp in my own project. 我正在尝试在自己的项目中使用jsoncpp的合并版本。 When using my makefile, it complains that it doesn't find json_tool.h: 使用我的makefile时,它抱怨找不到json_tool.h:

input/jsoncpp.cpp:193:23: fatal error: json_tool.h: No such file or directory
#include "json_tool.h"

In my makefile I have: 在我的makefile中,我有:

jsoncpp.o: input/jsoncpp.cpp input/json/json.h
    $(CXX) $(CXXFLAGS) -c input/jsoncpp.cpp $(LIBS)

with jsoncpp.cpp and json/json.h the ones created by the amalgamate.py script. 使用jsoncpp.cpp和json / json.h,由amalgamate.py脚本创建。 What am I doing wrong? 我究竟做错了什么?

You have not set up your include path properly 您尚未正确设置包含路径

Add the following to your build command: 将以下内容添加到您的构建命令中:

-I input/json/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM