主题 : 无法动态链接执行 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 50195
精华: 0
发帖: 15
金钱: 75 两
威望: 15 点
综合积分: 30 分
注册时间: 2011-06-20
最后登录: 2011-11-10
楼主  发表于: 2011-07-05 13:42

 无法动态链接执行

大家好,我想请教一个问题:
在宿主机上用交叉编译环境编译出来的应用程序hello(不采用静态编译),假如在目标机的根文件下有动态链接库。现在通过NFS把应用程序放到目标机的根文件usr下,通过执行./hello,为何无法执行?

hello.c源程序:

#include <stdio.h>

void main()
{
    printf("hello world\n");
    return 0;
}


目标机执行:
#ls
bin      etc      linuxrc  proc    sbin    tmp
dev      lib      mnt      root    sys      usr
# cd usr
# ls
bin    hello  sbin
# ./hello
-sh: ./hello: not found