找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1460|回复: 3
收起左侧

CODE BLOCK下编译出错

[复制链接]
ID:1006187 发表于 2022-3-8 12:26 | 显示全部楼层 |阅读模式
||=== Build: debug in librttos (compiler: GNU GCC Compiler for ARM) ===|
c:\program files (x86)\gnu tools arm embedded\5.3 2016q1\arm-none-eabi\include\sys\_timeval.h|52|error: redefinition of 'struct timeval'|
..\source\rtt\net\lwip\src\include\lwip\sockets.h|293|note: originally defined here|||=== Build failed: 1 error(s), 12 warning(s) (0 minute(s), 0 second(s))

编译结果如上。
ARM9上无系统。2013版的arm-none-eabi.exe据说编译能通过。我新装的2021版CODE BLOCK,自带的2016版arm-none-eabi就报错。重复定义了
timeval结构体。
奇怪的是这个路径c:\program files (x86)\gnu tools arm embedded\5.3 2016q1\arm-none-eabi\include\sys\_timeval.h
代码里根本没涉及到这里。不明白什么情况,请大神们指点。

回复

使用道具 举报

ID:277550 发表于 2022-3-8 15:18 | 显示全部楼层
修改_timeval.h,作防止重复加载限制
回复

使用道具 举报

ID:1006187 发表于 2022-3-8 19:40 | 显示全部楼层
devcang 发表于 2022-3-8 15:18
修改_timeval.h,作防止重复加载限制

你没明白我的意思,我都删掉了,还这样报错。报错的路径。。。。。。你注意看,根本不是项目文件夹里的。
我把arm none eabi降版本,降到了2013年的一个版本上,这个问题就没了。
其它问题又来了。。。。启动的.S里面又开始报错了。
无定义__bss_start     __bss_end
rt_startup_gcc.s   
                /* clear .bss */
                mov     r0,#0                   /* get a zero */
                ldr     r1,=__bss_start         /* bss start  */
                ldr     r2,=__bss_end           /* bss end    */
回复

使用道具 举报

ID:301191 发表于 2022-3-10 02:32 | 显示全部楼层
顶一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表