c++ - C++ 核心库的编译错误

标签 c++ compilation

在编译软件期间,我不断收到以下错误消息。

PasteBin 链接:http://pastebin.com/TmHKqey2

我已经尝试过讨论类似问题的论坛上的解决方案:将所有 makefile 从 makefile.* 更改为 Makefile.*;更新 header 等 - 但没有成功。

有什么建议/见解吗?

谢谢!

$ make
colorgcc -O -DLONGDOUBLE   -I ../include -c AddNode.c
colorgcc -O -DLONGDOUBLE   -I ../include -c CTableGen.c
colorgcc -O -DLONGDOUBLE   -I ../include -c CorrectionTable.c
CorrectionTable.c: In function ‘CorrectionTableInit’:
CorrectionTable.c:590: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
CorrectionTable.c:623: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
colorgcc -O -DLONGDOUBLE   -I ../include -c Decomp.c
colorgcc -O -DLONGDOUBLE   -I ../include -c DLBfreeOld.c
colorgcc -O -DLONGDOUBLE   -I ../include -c FMComm.c
colorgcc -O -DLONGDOUBLE   -I ../include -c FMSigma2.c
colorgcc -O -DLONGDOUBLE   -I ../include -c FMSupport.c
colorgcc -O -DLONGDOUBLE   -I ../include -c FreeInitArrays.c
colorgcc -O -DLONGDOUBLE   -I ../include -c GetNewNativeNode.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Heap.c
colorgcc -O -DLONGDOUBLE   -I ../include -c InitCellDomains.c
colorgcc -O -DLONGDOUBLE   -I ../include -c InitCellNatives.c
colorgcc -O -DLONGDOUBLE   -I ../include -c InitCellNeighbors.c
colorgcc -O -DLONGDOUBLE   -I ../include -c InitSendDomains.c
colorgcc -O -DLONGDOUBLE   -I ../include -c InitRemoteDomains.c
colorgcc -O -DLONGDOUBLE   -I ../include -c MemCheck.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Meminfo.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Param.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Parse.c
colorgcc -O -DLONGDOUBLE   -I ../include -c QueueOps.c
colorgcc -O -DLONGDOUBLE   -I ../include -c RBDecomp.c
colorgcc -O -DLONGDOUBLE   -I ../include -c RSDecomp.c
colorgcc -O -DLONGDOUBLE   -I ../include -c ReadRestart.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Timer.c
colorgcc -O -DLONGDOUBLE   -I ../include -c Util.c
In file included from /usr/include/stdio.h:34,
                 from Util.c:119:
/usr/lib/gcc/i486-linux-gnu/4.4.3/include/stddef.h:211: error: expected identifier or ‘(’ before ‘typedef’
In file included from /usr/include/stdio.h:75,
                 from Util.c:119:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before ‘size_t’
/usr/include/libio.h:364: error: expected declaration specifiers or ‘...’ before ‘size_t’
/usr/include/libio.h:373: error: expected declaration specifiers or ‘...’ before ‘size_t’

[更新:添加了 make 输出的初始部分]

最佳答案

如果我在包含文件之前有错误,我通常会得到这个。所以我会在包含 stdio.h 之前查看 Util.c 以查看是否存在语法错误。错误可能出现在您在 stdio.h 之前包含的某些包含中。

最常见的原因,缺少“;”或“}”。

关于c++ - C++ 核心库的编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7692295/

相关文章:

c++ - 如何解决字段 'classname'有不完整的类型错误

c++ - 从可执行文件中读取和验证证书

C# - 将变量编译为名称/代码

c++ - 如何使 eclipse cdt(c++) 一键构建&运行?

delphi - 为什么 "The Tomes of Delphi"处的代码无法编译?

c++ - 如何为库PCRE2生成单个 header ?

c++ - 有没有办法使用特征使 pos_type 和 off_type 成为 int64_t?

c++ - 从 Windows 注册表中保存的工作区检索窗口位置

c - 如何在 C 中定义全局常量 char 指针并在整个文件中重新定义指向值

c++ - 通过命令行编译C/C++/Visual C程序