Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
C++_cpp
exit.c
编译问题
C++编译问题 undefined reference to `_exit'
发布于 2020-08-04 11:40:37 浏览:3591
订阅该版
各位大神,小弟开启了C++功能,但是编译出了问题,编译打印如下,求助: ``` arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O0 -ffunction-sections -fdata-sections -Wall -g -gdwarf-2 -Xlinker --gc-sections -Wl,-Map,"rtthread.map" -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/memheap.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-m4/context_gcc.o ./rt-thread/libcpu/arm/cortex-m4/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/minilibc/ctype.o ./rt-thread/components/libc/compilers/minilibc/math.o ./rt-thread/components/libc/compilers/minilibc/qsort.o ./rt-thread/components/libc/compilers/minilibc/rand.o ./rt-thread/components/libc/compilers/minilibc/stdlib.o ./rt-thread/components/libc/compilers/minilibc/string.o ./rt-thread/components/libc/compilers/minilibc/time.o ./rt-thread/components/finsh/cmd.o ./rt-thread/components/finsh/finsh_compiler.o ./rt-thread/components/finsh/finsh_error.o ./rt-thread/components/finsh/finsh_heap.o ./rt-thread/components/finsh/finsh_init.o ./rt-thread/components/finsh/finsh_node.o ./rt-thread/components/finsh/finsh_ops.o ./rt-thread/components/finsh/finsh_parser.o ./rt-thread/components/finsh/finsh_token.o ./rt-thread/components/finsh/finsh_var.o ./rt-thread/components/finsh/finsh_vm.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 ./rt-thread/components/cplusplus/Mutex.o ./rt-thread/components/cplusplus/Semaphore.o ./rt-thread/components/cplusplus/Thread.o ./rt-thread/components/cplusplus/crt.o ./rt-thread/components/cplusplus/crt_init.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cec.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_crc.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cryp.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cryp_ex.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rng.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o ./libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_usart.o ./libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.o ./libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.o ./libraries/HAL_Drivers/drv_common.o ./libraries/HAL_Drivers/drv_gpio.o ./libraries/HAL_Drivers/drv_usart.o ./board/CubeMX_Config/Src/stm32f4xx_hal_msp.o ./board/board.o ./applications/main.o d:/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/5.4.1/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libg.a(lib_a-exit.o): In function `exit': exit.c:(.text.exit+0x16): undefined reference to `_exit' collect2.exe: error: ld returned 1 exit status make: *** [makefile:75: rtthread.elf] Error 1 "make -j8 all" terminated with exit code 2. Build might be incomplete. ``` 请问exit.c:(.text.exit+0x16): undefined reference to `_exit'问题应该如何解决
查看更多
wuhanstudio
2021-04-04
这家伙很懒,什么也没写!
打开 libc 就可以了: ``` RT-Thread Components ---> POSIX layer and C standard library ---> [*] Enable libc APIs from toolchain ```
2
个回答
默认排序
按发布时间排序
keyq
2020-12-04
这家伙很懒,什么也没写!
我也遇到了怎么解决呢?
撰写答案
登录
注册新账号
关注者
0
被浏览
3.6k
关于作者
xiaofyao
这家伙很懒,什么也没写!
提问
14
回答
8
被采纳
0
关注TA
发私信
相关问题
1
RT-STUDIO下加入TOUCHGFX?
2
有没有人在RTT上使用C++编程
3
nano c++ 报错如何处理
4
让成员函数能作为rt_device中的回调函数
5
成员函数作为回调函数
6
开启C++功能后,rt_kprintf和单步调试功能无法使用
7
RT-Thread Studio C++ 异常处理 (与预期不一致)
8
C++继承Thread类报错怎么办?
9
STM32使用C++ 编译报错
10
rt-studio编译c++
推荐文章
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
简单两步配置RTT源码阅读环境 vsc+clangd
2
恩智浦[FRDM-MCXN947]初探 之 ADC与DAC
3
LVGL使用字库IC芯片显示中文
4
基于STM32H750和Rt-Thread的CANFD通信实现的记录(一)
5
freemodbus主机在freertos的适配,参考rtthread例程
热门标签
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
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
编译报错
Debug
SFUD
msh
rt_mq_消息队列_msg_queue
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1443
个答案
289
次被采纳
张世争
805
个答案
174
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
148
次被采纳
本月文章贡献
出出啊
1
篇文章
4
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
1
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部