天嵌 ARM开发社区

 找回密码
 注册
查看: 4001|回复: 5

在用arm-linux-gcc编译hello.c后,怎样执行a.out?

[复制链接]
mcnana 发表于 2010-3-22 17:58:00 | 显示全部楼层 |阅读模式
在用arm-linux-gcc编译hello.c后,怎样执行a.out?
我用$./a.out
出现bash: ./a.out:cannot execute binary file
是为什么呢?
还有hello.cc用什么编译啊?是arm-linux-g++么?
亚瑟王 发表于 2010-3-22 19:31:16 | 显示全部楼层
什么意思?不知道你从哪里看到这个编译方法?
 楼主| mcnana 发表于 2010-3-22 20:07:31 | 显示全部楼层
就是用gcc编译hello.c啊
之后生成a.out
可是a.out如何执行呢?
亚瑟王 发表于 2010-3-23 11:39:52 | 显示全部楼层
把你编译命令贴出来。还是那句话,不知道你从哪里看到这个编译方法的。
cexowginui 发表于 2010-3-23 17:32:16 | 显示全部楼层
用arm-linux-gcc编译的要在arm平台的linux运行的.
你应该是在PC机上运行.那是X86平台的.要用gcc编译
./a.out:cannot execute binary file
就是说不能运行的二进制文件
 楼主| mcnana 发表于 2010-3-24 14:41:26 | 显示全部楼层
5# cexowginui 我知道了 谢谢大家
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-6 14:25 , Processed in 1.090863 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表