Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
linker链接报错
RT-Thread Studio 生成的STM32WLE5工程编译报ctime.c:221: first defined here错误
发布于 2023-04-11 20:01:09 浏览:833
订阅该版
我用工程生成了STM32WLE5的初始工程,编译后报错: ``` arm-none-eabi-gcc "../applications/main.c" linking... d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/stdlib.o: in function `__rt_libc_exit': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/stdlib.c:18: multiple definition of `__rt_libc_exit'; ./rt-thread/components/libc/compilers/common/cstdlib.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/cstdlib.c:18: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/stdlib.o: in function `system': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/stdlib.c:30: multiple definition of `system'; ./rt-thread/components/libc/compilers/common/cstdlib.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/cstdlib.c:40: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `gmtime_r': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:173: multiple definition of `gmtime_r'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:173: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `tz_is_dst': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:1001: multiple definition of `tz_is_dst'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:1038: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `gmtime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:212: multiple definition of `gmtime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:221: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `localtime_r': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:219: multiple definition of `localtime_r'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:228: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `tz_get': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:996: multiple definition of `tz_get'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:1033: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `localtime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:228: multiple definition of `localtime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:237: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `mktime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:235: multiple definition of `mktime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:244: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `timegm': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:369: multiple definition of `timegm'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:396: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `asctime_r': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:245: multiple definition of `asctime_r'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:254: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `asctime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:291: multiple definition of `asctime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:308: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `ctime_r': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:298: multiple definition of `ctime_r'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:315: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `ctime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:305: multiple definition of `ctime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:322: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `stime': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:346: multiple definition of `stime'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:373: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `gettimeofday': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:444: multiple definition of `gettimeofday'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:481: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `settimeofday': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:469: multiple definition of `settimeofday'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:506: first defined here d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./rt-thread/components/libc/compilers/common/time.o: in function `tz_set': D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/time.c:988: multiple definition of `tz_set'; ./rt-thread/components/libc/compilers/common/ctime.o:D:\RT-ThreadStudio\workspace\STM32WLE5_demo\Debug/../rt-thread/components/libc/compilers/common/ctime.c:1025: first defined here ``` rtthread 版本为4.1.1
查看更多
2
个回答
默认排序
按发布时间排序
宇宙码蚁
2023-04-11
接口与实现分离
确认一下`rt-thread/components/libc/compilers/common`目录下,是不是既有`cstdlib.c`又有`stdlib.c`两个源文件,应该是只有`cstdlib.c`
Lu_盼盼
2023-04-12
这家伙很懒,什么也没写!
非常感楼上大佬的解答,我在另一台电脑上用rt thread studio新建工程,就没有报这样的错误。是不是我更新了版本号,新的跟旧的文件都在这里,所以报错了?
撰写答案
登录
注册新账号
关注者
0
被浏览
833
关于作者
Lu_盼盼
这家伙很懒,什么也没写!
提问
6
回答
19
被采纳
0
关注TA
发私信
相关问题
1
rt-thread studio linking第三方库出现问题
2
gcc编译不能链接超过 2MB
3
请问如何修改IAR的工程的linker的路径?
4
编译失败ld returned 1 exit status
5
代码链接错误,找不到函数
6
开启-flto后在链接阶段失败,有人碰到过的吗 ?
7
HAl库函数链接报错
8
hal库里定时器相关的函数出错
9
挂载sram时链接错误。。。。。。。。。。。。
10
Link error: `m_data' overflowed by 1480440 bytes
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
RT-thread 缩写字典
2
RT Thread 源码分析笔记 :线程和调度器
3
RT-Thread项目助手v0.2.0 - 支持Env Windows
4
RttreadV5.10上,GD32F450Z RTC时间显示问题
5
rt-smart启动流程分析
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
UART
WIZnet_W5500
ota在线升级
PWM
cubemx
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
813
个答案
177
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
聚散无由
2
篇文章
13
次点赞
catcatbing
2
篇文章
2
次点赞
Wade
2
篇文章
2
次点赞
xiaorui
1
篇文章
1
次点赞
zhuzhuzhu
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部