新建工程,无修改代码,编译错误

发布于 2020-08-14 10:19:19
09:56:59 **** Incremental Build of configuration Debug for project stm32f407 ****
make -j4 all 
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/newlib/syscalls.c"
linking...
C:\Users\xulis\AppData\Local\Temp\cclXOtXT.ltrans2.ltrans.o: In function `exit':
E:\RT-ThreadStudio\workspace\stm32f407\Debug/../rt-thread/components/libc/compilers/newlib/syscalls.c:405: multiple definition of `exit'
e:/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\libc.a(lib_a-exit.o):exit.c:(.text.exit+0x0): first defined here
e:/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\libc.a(lib_a-mprec.o): In function `_Balloc':
mprec.c:(.text._Balloc+0x22): undefined reference to `_calloc_r'
mprec.c:(.text._Balloc+0x3e): undefined reference to `_calloc_r'
e:/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\libc.a(lib_a-svfiprintf.o): In function `__ssprint_r':
vfprintf.c:(.text.__ssprint_r+0xc0): undefined reference to `_realloc_r'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:60: rtthread.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

09:57:04 Build Failed. 2 errors, 0 warnings. (took 4s.497ms)

提示重复定义,但这是新建工程,无修改代码,请教下这是什么原因?错误信息没看太懂
微信截图_20200814101808.png
微信截图_20200814101808.png

查看更多

关注者
0
被浏览
98
1 个回答
xulishow520
xulishow520 2020-08-14

微信截图_20200814101808.png

发现只要使能了这个选项就会报错,不使能就没有问题?请问下这是什么原因?

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友