当前位置: 技术问答>linux和unix
江湖救急-程序编译中的问题!在线等待!
来源: 互联网 发布时间:2015-07-11
本文导语: 今天的程序编译中出现如下问题: In file included from ext_udp.h:29, from ext_udp.c:16: /opt/eldk/usr/../ppc_7xx/usr/include/netinet/in.h:260: `__u32' redeclared as different kind of symbol /opt/eldk/usr/../ppc_7xx/usr/include...
今天的程序编译中出现如下问题:
In file included from ext_udp.h:29,
from ext_udp.c:16:
/opt/eldk/usr/../ppc_7xx/usr/include/netinet/in.h:260: `__u32' redeclared as different kind of symbol
/opt/eldk/usr/../ppc_7xx/usr/include/asm/types.h:18: previous declaration of `__u32'
/opt/eldk/usr/../ppc_7xx/usr/include/netinet/in.h:262: `__u16' redeclared as different kind of symbol
/opt/eldk/usr/../ppc_7xx/usr/include/asm/types.h:15: previous declaration of `__u16'
make: *** [ext_udp.o] Error 1
这个问题在slackware上不会出现,在redhat上编译出现,redhat是交叉编译环境,哪位大虾遇到过此类问题,请指点,小女子将不胜感激,谢谢!
In file included from ext_udp.h:29,
from ext_udp.c:16:
/opt/eldk/usr/../ppc_7xx/usr/include/netinet/in.h:260: `__u32' redeclared as different kind of symbol
/opt/eldk/usr/../ppc_7xx/usr/include/asm/types.h:18: previous declaration of `__u32'
/opt/eldk/usr/../ppc_7xx/usr/include/netinet/in.h:262: `__u16' redeclared as different kind of symbol
/opt/eldk/usr/../ppc_7xx/usr/include/asm/types.h:15: previous declaration of `__u16'
make: *** [ext_udp.o] Error 1
这个问题在slackware上不会出现,在redhat上编译出现,redhat是交叉编译环境,哪位大虾遇到过此类问题,请指点,小女子将不胜感激,谢谢!
|
把两个冲突的头文件调个个儿,
#ifndef _INCLUDE_IN_H
#define _INCLUDE_IN_H
#include
#endif
放在最前面试试。
#ifndef _INCLUDE_IN_H
#define _INCLUDE_IN_H
#include
#endif
放在最前面试试。
|
好像是头文件冲突
|
有可能是别的头文件中引用了这个头文件,查查看