junk at end of line, first unrecognized character is `-'

简介:
这几天没事儿在折腾RealView,想把自己的开发环境迁移到RealView下,好不容易找了个破解版安装上,结果把自己的程序导进来出现编译错误:
 
junk at end of line, first unrecognized character is `-'
 
仔细一看,这是一个.s文件,也就是汇编程序文件编译发生了错误,文件中的每一行代码都是错误,错误原因都跟上面的类似。在网上找了半天的原因,大部分是提问的,少有回答的,就算是回答,大部分是没用的,只有一个我认为还算有点用,可是也语焉不详:“这是环境配置的问题。”
TNND,我也知道这是环境配置问题,但问题是环境配置参数那么多,到底是哪个配置出了问题?看来网上明白人不多,求人不如求己,还是自己搞定吧。
在我的项目上单击右键,选择“Properties”,然后是“C/C++ Build”—>“Tool Chain”,发现使用的编译工具全是GCC、MinGW系列的,奇怪啊,我创建项目的时候明明选择创建”RealView Project”的,怎么编译工具忽然变成了这个了?
仔细回想一下项目创建的过程,原来我是创建了“RealView Project”项目后,使用“Import”功能把原来的代码导入进来,问题是原来的代码我用的是Eclipse CDT创建的项目,导入的时候提示我是否覆盖现有的Project属性,我选择了是,估计是因此把编译工具给我修改成了GCC。
重新创建一个项目,这回不Import了,将原来的程序代码拷贝到新的项目目录下,然后打开“Tool Chain”一看,果然,编译工具变成了“RealView编译工具”了。这回汇编文件编译就没有上面的问题了。
后续:嗯,这个问题的确没有了,可俗话说“按下葫芦起了瓢”,现在我的RealView又出现了别的问题,还在研究中,搞定了再贴出来。




本文转自 tywali 51CTO博客,原文链接:http://blog.51cto.com/lancelot/318745,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
JSON Java 数据格式
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
JSON parse error: Unexpected character (‘t‘ (code 116)): was expecting double-quote to start field n
|
4月前
|
Unix Linux Shell
syntax error: unexpected end of file
syntax error: unexpected end of file
20 0
|
Java
解决Command line is too long. Shorten command line for ServiceStarter or also for Application报错
解决Command line is too long. Shorten command line for ServiceStarter or also for Application报错
292 0
Newline required at end of file but not found.
Newline required at end of file but not found.
158 0
Newline required at end of file but not found.
|
Linux iOS开发 MacOS
报错 sed: 1: extra characters at the end of d command
报错 sed: 1: extra characters at the end of d command
529 0
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
syntax error, expect {, actual [, pos 0 at
syntax error, expect {, actual [, pos 0 at
200 0
运行 ‘ApiApplication‘ 出错: Command line is too long. Shorten command line for ShopApiApplication or
运行 ‘ApiApplication‘ 出错: Command line is too long. Shorten command line for ShopApiApplication or
222 0
运行 ‘ApiApplication‘ 出错: Command line is too long. Shorten command line for ShopApiApplication or
|
IDE 开发工具
C - error: converting to execution character set:Illegal byte sequence
C - error: converting to execution character set:Illegal byte sequence
1180 0
C - error: converting to execution character set:Illegal byte sequence
成功解决ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3
成功解决ParserError: Error tokenizing data. C error: Expected 2 fields in line 53, saw 3