今天使用Jsonapp, 在編譯時添加了頭檔案搜索路徑-Ixxx/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;
....
去掉這個指定路徑可以編譯通過. 另外,我還試了一下,在cpp檔案中include xxx/json下的所有頭檔案時是可以
編譯通過的,只有添加-I后才出錯.
為什么涅?
uj5u.com熱心網友回復:
后來怎么解決的?uj5u.com熱心網友回復:
看下使用的頭檔案 和 庫是否一致?轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/27569.html
標籤:基礎類
上一篇:知識點整理
