在eclipse中执行编译时,在Console(CDT Build Console)和Problems中会有中文乱码信息,如下图所示。这些乱码严重干扰我们排除编译时出现的问题,所以非常有必要解决它。
make all
make: Warning: File `base/subdir.mk’ has modification time 0.19 s in the future
Building file: ../service/main/main.c
Invoking: Cross GCC Compiler
arm-eabi-gcc -I”E:\workspace\proj_ecos\src\target2_ecos\ecos_stm32f103xx_ram_install\include” -I”E:\workspace\proj_ecos\src” -O0 -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mcpu=cortex-m3 -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF”service/main/main.d” -MT”service/main/main.d” -o “service/main/main.o” “../service/main/main.c”
cc1: warning: command line option 鈥?Woverloaded-virtual鈥?is valid for C++/ObjC++ but not for C [enabled by default]
cc1: warning: command line option 鈥?fno-rtti鈥?is valid for C++/ObjC++ but not for C [enabled by default]
../service/main/main.c: In function 鈥榗yg_user_start鈥?
../service/main/main.c:61:2: error: unknown type name 鈥榓ppl_rc鈥?../service/main/main.c:61:10: warning: unused variable 鈥榬c鈥?[-Wunused-variable]
make: *** [service/main/main.o] Error 1
解决方法:
在C/C++下的Enviornment中添加LANG变量,值为en_US,如下图所示: