junk at end of line, first unrecognized character is `-'
2010-05-21 09:56
274 查看
这几天没事儿在折腾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又出现了别的问题,还在研究中,搞定了再贴出来。
阅读更多
相关文章推荐
- 解决Error: junk at end of line, first unrecognized character is `@'
- junk at end of line, first unrecognized character is `-'
- no newline at the end of file
- C-free提示warning: no newline at end of file
- 关于SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data错误的解决
- warning: here-document at line 17 delimited by end-of-file (wanted `EOF')
- android中Http访问时 connection.getResponseCode()不被执行,且报错 org.json.JSONException: End of input at character 0 of .
- 如何解决warning: no newline at end of file?
- 关于no newline at end of file
- 错误 no newline at end of file
- org.json.JSONException: End of input at character 0 of 异常
- warning: no newline at end of file
- warning no newline at the end of file
- Qt5:"Designer: An error has occurred while reading the UI file at line 1, column 0: Premature end of document."错误
- 代码消息org.json.JSONException: End of input at character 0 of
- main.c :10:2 warning: no newline at the end of file
- backslash-newline at end of file
- gcc warning: no newline at end of file
- 集成支付宝时:JSON.parse: unexpected character at line 1 column 1 of the JSON data
- input01.sh: line 11: warning: here-document at line 4 delimited by end-of-file (wanted `EOF') input01.sh: line 12: syntax error: unexpected end of file