在Ubuntu 8.1上,g -4.1或其他人无法找到c – size_t

前端之家收集整理的这篇文章主要介绍了在Ubuntu 8.1上,g -4.1或其他人无法找到c – size_t前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这发生在我之前,但我不记得我如何修复它.

我不能在一个新的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绝对是在路上,正在被拾起.我通过更改文件名来验证它的错误

有人有什么想法吗?我真的很感谢帮助…

首先删除-I /usr/include / linux和-I /usr/include.手动添加系统目录以包含路径不会有任何影响,也不会中断事件.此外,为了额外的安全,删除-frepo.
原文链接:https://www.f2er.com/ubuntu/347267.html

猜你在找的Ubuntu相关文章