这发生在我之前,但我不记得我如何修复它.
我不能在一个新的Ubuntu安装上编译这些程序…有些东西与我的标题不符.
我试过g -4.1和4.3没有用.
g++ -g -frepo -DIZ_LINUX -I/usr/include/linux -I/usr/include -I/include -c qlisttest.cpp /usr/include/libio.h:332: error: ‘size_t’ does not name a type /usr/include/libio.h:336: error: ‘size_t’ was not declared in this scope /usr/include/libio.h:364: error: ‘size_t’ has not been declared /usr/include/libio.h:373: error: ‘size_t’ has not been declared /usr/include/libio.h:493: error: ‘size_t’ does not name a type /usr/include/stdio.h:294: error: ‘size_t’ has not been declared ...
文件…
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> ... @ubuntu:~/work/zpk/src$cat /usr/include/linux/types.h | grep size_t typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t;
types.h绝对是在路上,正在被拾起.我通过更改文件名来验证它的错误…
有人有什么想法吗?我真的很感谢帮助…