Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
linker链接报错
math.h数学函数库
rt-thread联合cubemx联合开发编译程序出现未定义sqrt
发布于 2024-02-04 10:25:15 浏览:335
订阅该版
程序计算公式中用到了sqrt函数,在程序上面也包含了数学库文件
,程序中多处使用sqrt函数,但只有此两处出现问题,将代码屏蔽问题消失,程序编译之后出现如下错误:  ``` linking... arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O0 -ffunction-sections -fdata-sections -Wall -g -gdwarf-2 -T "G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\linkscripts\STM32F103ZD\link.lds" -Xlinker --gc-sections -Wl,-Map,"rtthread.map" -Xlinker --cref -o "rtthread.elf" ./rt-thread/src/clock.o ./rt-thread/src/components.o ./rt-thread/src/device.o ./rt-thread/src/idle.o ./rt-thread/src/ipc.o ./rt-thread/src/irq.o ./rt-thread/src/kservice.o ./rt-thread/src/mem.o ./rt-thread/src/mempool.o ./rt-thread/src/object.o ./rt-thread/src/scheduler.o ./rt-thread/src/signal.o ./rt-thread/src/thread.o ./rt-thread/src/timer.o ./rt-thread/libcpu/arm/cortex-m3/context_gcc.o ./rt-thread/libcpu/arm/cortex-m3/cpuport.o ./rt-thread/libcpu/arm/common/backtrace.o ./rt-thread/libcpu/arm/common/div0.o ./rt-thread/libcpu/arm/common/showmem.o ./rt-thread/components/libc/compilers/common/time.o ./rt-thread/components/finsh/cmd.o ./rt-thread/components/finsh/msh.o ./rt-thread/components/finsh/shell.o ./rt-thread/components/drivers/src/completion.o ./rt-thread/components/drivers/src/dataqueue.o ./rt-thread/components/drivers/src/pipe.o ./rt-thread/components/drivers/src/ringblk_buf.o ./rt-thread/components/drivers/src/ringbuffer.o ./rt-thread/components/drivers/src/waitqueue.o ./rt-thread/components/drivers/src/workqueue.o ./rt-thread/components/drivers/serial/serial.o ./rt-thread/components/drivers/misc/pin.o ./libraries/STM32F1xx_HAL_Driver/Src/Legacy/stm32f1xx_hal_can.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_adc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cec.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_crc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_eth.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_hcd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2s.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_irda.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_iwdg.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_mmc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nand.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nor.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pccard.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_smartcard.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_usart.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_wwdg.o ./libraries/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.o ./libraries/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.o ./libraries/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.o ./drivers/board.o ./drivers/drv_adc.o ./drivers/drv_clk.o ./drivers/drv_common.o ./drivers/drv_eth.o ./drivers/drv_flash_f1.o ./drivers/drv_gpio.o ./drivers/drv_hwtimer.o ./drivers/drv_pwm.o ./drivers/drv_qspi.o ./drivers/drv_rtc.o ./drivers/drv_sdio.o ./drivers/drv_soft_i2c.o ./drivers/drv_spi.o ./drivers/drv_usart.o ./drivers/drv_usbd.o ./drivers/drv_usbh.o ./drivers/drv_wdt.o ./cubemx/Src/adc.o ./cubemx/Src/dma.o ./cubemx/Src/gpio.o ./cubemx/Src/iwdg.o ./cubemx/Src/main.o ./cubemx/Src/stm32f1xx_hal_msp.o ./cubemx/Src/stm32f1xx_it.o ./cubemx/Src/tim.o ./cubemx/Src/usart.o ./applications/main.o ./applications/user_adc_dma.o ./applications/user_crc.o ./applications/user_lltask.o ./applications/user_sys.o ./applications/user_lltask.o: In function `adc_dma_root_mean_square_data': G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\Debug/../applications/user_lltask.c:779: undefined reference to `sqrt' G:\LLJC-20240112\LLJC_STM32F103ZDT6_B1.0.2\LLJC_STM32F103ZDT6_B1.0.2\Debug/../applications/user_lltask.c:780: undefined reference to `sqrt' collect2.exe: error: ld returned 1 exit status make: *** [makefile:59: rtthread.elf] Error 1 "make -j4 all" terminated with exit code 2. Build might be incomplete. ```
查看更多
0
个回答
默认排序
按发布时间排序
暂无答案,快来添加答案吧
撰写答案
登录
注册新账号
关注者
0
被浏览
335
关于作者
OONW_6902
这家伙很懒,什么也没写!
提问
2
回答
0
被采纳
0
关注TA
发私信
相关问题
1
math.h没有asin的程序
2
studio编译pow报错的问题
3
studio中进行对数运算的问题
4
math.h函数无法使用
5
studio中该如何调用math.h中的函数而链接不出错?
6
无法使用 math 函数 和 Studio 中的函数
7
rt thread studio 中math库如何使用,急求!!!
8
Nano项目自动添加的 CMSIS/Lib/GCC/ math库是错误的吗?
9
Stemwin编译出错
10
请问RT-Thread Studio编译报错:undefined reference to `log'该如何解决?
推荐文章
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-thred的stm32h723对应bsp包CubeMX添加其他外设报错
2
RT-Thread中的time溢出问题,时间戳溢出,解决方法
3
ART-PI使用env驱动ETH网卡,pc和板子可以ping通
4
SystemView线程名字不显示
5
只用网页也能跑RT-Smart 无门槛腾讯Cloud studio + smart-build快速构建
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
UART
ESP8266
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
ulog
SFUD
msh
C++_cpp
MicroPython
本月问答贡献
RTT_逍遥
9
个答案
2
次被采纳
三世执戟
8
个答案
1
次被采纳
KunYi
8
个答案
1
次被采纳
winfeng
2
个答案
1
次被采纳
YZRD
2
个答案
1
次被采纳
本月文章贡献
catcatbing
2
篇文章
5
次点赞
swet123
1
篇文章
4
次点赞
Days
1
篇文章
4
次点赞
YZRD
1
篇文章
2
次点赞
阳光的掌控者
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部