感觉程序没有问题,编译生成a.out后,拷贝到开发板执行,提示 -sh: ./a.out: not found。
上网查找问题,大概原因有2个
一就是有可能/lib下面没有C库 就是没有glibc或者uclibc的动态库
二就是你板子上的C库和编译hello链接时用的C库不一样, 差别太大
解决办法:编译选项增加 -static
时间: 2024-08-12 08:12:05
感觉程序没有问题,编译生成a.out后,拷贝到开发板执行,提示 -sh: ./a.out: not found。
上网查找问题,大概原因有2个
一就是有可能/lib下面没有C库 就是没有glibc或者uclibc的动态库
二就是你板子上的C库和编译hello链接时用的C库不一样, 差别太大
解决办法:编译选项增加 -static