当前位置: 技术问答>linux和unix
linux编译下出现如下问题是什么原因
来源: 互联网 发布时间:2016-10-06
本文导语: [liyu@localhost 接包程序]$ gcc -o pkgRecv pkgRecv.c In file included from pkgRecv.c:8: /usr/include/linux/ip.h:95: syntax error before "__u8" /usr/include/linux/ip.h:102: syntax error before "tot_len" /usr/include/linux/ip.h:103: syntax error before "id" /usr/...
[liyu@localhost 接包程序]$ gcc -o pkgRecv pkgRecv.c
In file included from pkgRecv.c:8:
/usr/include/linux/ip.h:95: syntax error before "__u8"
/usr/include/linux/ip.h:102: syntax error before "tot_len"
/usr/include/linux/ip.h:103: syntax error before "id"
/usr/include/linux/ip.h:104: syntax error before "frag_off"
/usr/include/linux/ip.h:105: syntax error before "ttl"
/usr/include/linux/ip.h:106: syntax error before "protocol"
/usr/include/linux/ip.h:107: syntax error before "check"
/usr/include/linux/ip.h:108: syntax error before "saddr"
/usr/include/linux/ip.h:109: syntax error before "daddr"
pkgRecv.c: In function `processData':
pkgRecv.c:86: dereferencing pointer to incomplete type
是因为gcc编译器版本高的缘故吗?
In file included from pkgRecv.c:8:
/usr/include/linux/ip.h:95: syntax error before "__u8"
/usr/include/linux/ip.h:102: syntax error before "tot_len"
/usr/include/linux/ip.h:103: syntax error before "id"
/usr/include/linux/ip.h:104: syntax error before "frag_off"
/usr/include/linux/ip.h:105: syntax error before "ttl"
/usr/include/linux/ip.h:106: syntax error before "protocol"
/usr/include/linux/ip.h:107: syntax error before "check"
/usr/include/linux/ip.h:108: syntax error before "saddr"
/usr/include/linux/ip.h:109: syntax error before "daddr"
pkgRecv.c: In function `processData':
pkgRecv.c:86: dereferencing pointer to incomplete type
是因为gcc编译器版本高的缘故吗?
|
加个头文件试试
#include
#include