在eclipse中执行编译时,在Console(CDT Build Console)和Problems中会有中文乱码信息,如下图所示。这些乱码严重干扰我们排除编译时出现的问题,所以非常有必要解决它。

image

image

image

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,如下图所示:

image

» 文章出处: reille博客—http://velep.com , 如果没有特别声明,文章均为reille博客原创作品
» 郑重声明: 原创作品未经允许不得转载,如需转载请联系reille#qq.com(#换成@)
分享到:

 Leave a Reply

(必须)

(我会替您保密的)(必须)

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

   
© 2012 velep.com | reille blog | 管理| 粤ICP备15065318号-2| 谷歌地图| 百度地图| Suffusion theme|Sayontan Sinha

无觅相关文章插件,快速提升流量