编译器的版本惹的祸

今天在编译一个RTC驱动测试程序时,出现了如下的一大堆提示:

In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:31,
                 from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
                 from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:32: warning: `__FD_ZERO' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:75: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:33: warning: `__FD_SET' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:63: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:34: warning: `__FD_CLR' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:67: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/bits/select.h:35: warning: `__FD_ISSET' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/asm/posix_types.h:71: warning: this is the location of the previous definition
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
                 from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:58: warning: `__NFDBITS' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/posix_types.h:22: warning: this is the location of the previous definition
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:60: warning: `__FDMASK' redefined
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/posix_types.h:34: warning: this is the location of the previous definition
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:26,
                 from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/time.h:70: warning: redefinition of `time_t'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:69: warning: `time_t' previously declared here
In file included from /opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/time.h:30,
                 from rtc.c:13:
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:49: warning: redefinition of `suseconds_t'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:22: warning: `suseconds_t' previously declared here
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/sys/select.h:74: conflicting types for `fd_set'
/opt/host/armv4l/lib/gcc-lib/armv4l-redhat-linux/2.95.3/../../../../armv4l-redhat-linux/include/linux/types.h:13: previous declaration of `fd_set'

 

几经周折才发现,原来是我用的编译器版本太低,只支持编译2.4内核相关的东东。而我是在2.6内核环境下进行的编译,于是换了个更高版本的编译器就搞定了。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值