当前位置:   article > 正文

在linux下面使用Jsoncpp,在编译时添加了头文件搜索路径-Ixxxx/json ,导致很多错误,如下: In file included from /usr/include/x86_64-li_in file included from /usr/include/cgal/io/file_he

in file included from /usr/include/cgal/io/file_header_off.h:31, from /usr/i

在linux下面使用Jsoncpp,在编译时添加了头文件搜索路径-Ixxxx/json ,导致很多错误,如下:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:482:0,
from /usr/include/c++/5/iostream:38,
from JsonProcess.cpp:1:
/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:44:19: error: missing binary operator before token “(”
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
.....
.....
In file included from /usr/include/libio.h:56:0,
from /usr/include/stdio.h:74,
from JsonProcess.cpp:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:41:20: error: missing binary operator before token “(”

if __GNUC_PREREQ (4, 6) && !defined _LIBC

....
/usr/include/c++/5/cwchar:208:11: error: ‘::wmemchr’ has not been declared
using ::wmemchr;
....
解决方式如下:

编译时json库的头文件搜索路径必须选择json.h的上一级目录,不能使头文件所在目录,在引用json.h的地方加上"json/json.h"
————————————————
版权声明:本文为CSDN博主「兵的N维空间」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yubing841026/article/details/76914662

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/201113
推荐阅读
相关标签
  

闽ICP备14008679号