Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个libnfc项目,我用它编译make-install并运行我的文件./xxx 现在我想使用json-c,xxx.c但一个简单的"#include <json/json.h>"不起作用。如何从 xxx.c 访问 json-c 方法?
libnfc
make-install
./xxx
json-c
xxx.c
"#include <json/json.h>"
谢谢你的回答,
苏菲
在 linux 上,你需要添加类似的东西
-I/usr/include/json-c -L/usr/lib -ljson-c
到你的编译命令。
如果您将 json-c 安装为
/usr/local/include/json
然后使用
gcc -ljson
如果您按照以下路径安装
/usr/local/include/json-c
然后使用 gcc -ljson-c