当前位置: 技术问答>linux和unix
交叉编译的文件在目标板无法执行
来源: 互联网 发布时间:2016-11-20
本文导语: 我在PC上写了一个简单的C程序 #include int main() { printf("hello!n"); return 1; } 用 arm-linux-gcc -o test -c test.c 交叉编译通过,然后把编译的二进制放到目标板上,修改权限执行,结果却是这样,这是怎么回事 # chmod 77...
我在PC上写了一个简单的C程序
#include
int main()
{
printf("hello!n");
return 1;
}
用 arm-linux-gcc -o test -c test.c 交叉编译通过,然后把编译的二进制放到目标板上,修改权限执行,结果却是这样,这是怎么回事
# chmod 777 test
# ./test
# ./test: line 1: syntax error: word unexpected (expecting ")")
#include
int main()
{
printf("hello!n");
return 1;
}
用 arm-linux-gcc -o test -c test.c 交叉编译通过,然后把编译的二进制放到目标板上,修改权限执行,结果却是这样,这是怎么回事
# chmod 777 test
# ./test
# ./test: line 1: syntax error: word unexpected (expecting ")")
|
|
检查一下你的交叉编译是不是arm-linux-gcc,我在我的平台上没有发现这个问题
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。