gcc 交叉编译错误 line 1: syntax error: word unexpected (expecting ")")
来源:互联网 发布:微信随机红包算法 编辑:程序博客网 时间:2024/05/22 10:48
在交叉编译过程中,比如arm平台
arm-linux-gcc -c hello -o hello
编译出来的程序在arm平台上运行时,将导致line 1: syntax error: word unexpected (expecting ")")错误,
这是由于 在编译目标hello的时候 使用了选项-c ,导致生成的hello 不是可执行文件,
可通过file hello 来查看其属性,如下所示:
hello: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
从file命令可以看出目标文件hello并非可执行文件,执行时当然会报错。
正常情况下,编译hello目标,不应该使用-c 选项,得到的目标属性如下所示:
hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
编译出来的目标hello 可正常运行。
- gcc 交叉编译错误 line 1: syntax error: word unexpected (expecting ")")
- 【GCC编译arm 运行出错】./any: line 1: syntax error: unexpected word (expecting ")")
- line 1: syntax error: unexpected word (expecting ")")
- line: 1: Syntax error: word unexpected (expecting ")")
- line 1: syntax error: word unexpected (expecting ")")
- /bin/helloworld: line 1: syntax error: unexpected word (expecting ")")
- ./i2cdetect: line 1: syntax error: unexpected word (expecting ")")
- line 1: syntax error: unexpected word (expecting ")")问题分析
- syntax error: unexpected word (expecting ")")错误解决办法
- Syntax error: word unexpected (expecting ")")
- Syntax error: word unexpected (expecting ")")
- Syntax error: word unexpected (expecting ")")
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ")
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ")
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ")
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ")
- 可执行程序无法在Linux上运行,显示line 1: syntax error: word unexpected (expecting ")" )
- Syntax error: word unexpected (expecting ")")错误的解决方法
- 子集树与排列树
- 迅捷FW150US无线网卡驱动安装
- EasyUI中Accordion的用法
- 杭电ACM HDU 3283 The Next Permutation
- 反向代理缓存/分段页面缓存
- gcc 交叉编译错误 line 1: syntax error: word unexpected (expecting ")")
- Struts2中的OGNL详解
- DOM4J生成和解析XML文档
- python小试
- 杭电ACM HDU 2674 N!Again
- EasyUI中Accordion使用的代码实例
- mergesort
- http://www.javadocexamples.com/java/io/
- 用Java加载SQL2005的种种