error: stray ‘\357’ in program
error: stray ‘\274’ in program
error: stray ‘\233’ in program
出现此类错误的原因,在编辑器中使用的utf-8的格式保存源代码中出现了中文的标点符号、
第二种办法:
在Linux虚拟机上开发时,遇到以下错误:
Making all in test
make[5]: Entering directory `/home/linux/software/zion/media/mux/disk/test'
powerpc-e300c3-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../include
umount_test.c:1: error: stray '\357' in program
umount_test.c:1: error: stray '\273' in program
umount_test.c:1: error: stray '\277' in program
make[5]: *** [umount_test.o] Error 1
make[5]: Leaving directory `/home/linux/software/zion/media/mux/disk/test'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/linux/software/zion/media/mux/disk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/linux/software/zion/media/mux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/linux/software/zion/media'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/linux/software/zion'
make: *** [all] Error 2
linux@ubuntu:~/software/zion$
我的解决办法:
将umount_test.c由utf-8格式另存为ANSI/ASCII格式,重新编译。因为你的编译器默认将文件编码转为UTF-8格式,可winavr作为gcc编译器是不认识这种格式的。
所有评论(0)