找回密码
 注册
搜索
查看: 1222|回复: 3

[讨论] 请教关于开发板上的可执行文件不能运行的问题

[复制链接]
发表于 2009-11-20 19:51:19 | 显示全部楼层 |阅读模式
请大侠解决这个问题:在linux pc机上由arm-linux-gcc 编译的可执行文件下载到开发板上运行时出现错误提示
用arm-linux-gcc -o test   test.c时
# ./test                                                                        
./test: No such file or directory//出现这个提示

后用arm-linux-gcc -static test.c -lstdc++ -o test
# ./test                                                                        
Segmentation fault   //出现这个错误提示

程序程序代码如下:
#include  <stdio.h>
int main()
{
  printf("hello ubuntu!\n");

   return 0;
}

pc机环境为ubuntu9.10   2.6内核     开发板内核为2.4
偶用minicom用zmodem协议传到开发板上
是不是因为pc机用的是2.6内核,开发板用的是2.4内核导致的?
还是minicom传输协议的问题?
或者是。。。。。?
希望解答下,在这里谢过!![em07][/COLOR][/COLOR][/COLOR][/COLOR][/COLOR]
 楼主| 发表于 2009-11-20 19:52:15 | 显示全部楼层
顶下自己[em14]
点评回复

使用道具 举报

发表于 2009-11-22 21:40:57 | 显示全部楼层
应该和开发环境的内核版本无关,只要编译器能正常运行就OK。
点评回复

使用道具 举报

 楼主| 发表于 2009-11-22 21:46:39 | 显示全部楼层
终于搞明白了是跟编译器版本有关
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-8 14:47 , Processed in 0.067990 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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