zoukankan      html  css  js  c++  java
  • linux环境下运行程序格式错误的问题,bash: ./helloworld: cannot execute binary file: Exec format error

    在编译完quecOpen的example helloworld之后,我运行此程序,结果报错,详情如下:

    ricks@ubuntu:~/share/project/ql-ol-sdk/ql-ol-extsdk/example/hello_world$ ./helloworld
    
    bash: ./helloworld: cannot execute binary file: Exec format error

    很明显,文件格式错误。因为这个例子是用 arm-gcc交叉编译工具编译的,所以不能在ubuntu环境下的bash下运行。

    所以,我把helloworld例程push到EC20模块,如下所示:

    ricks@ubuntu:~/share/project/ql-ol-sdk/ql-ol-extsdk/example/hello_world$ adb push helloworld  /usrdata
    89 KB/s (6068 bytes in 0.066s)

    在QuecOpen系统中运行成功,如下所示:

    /usrdata # ./helloworld 
    
    <Hello OpenLinux !>
    atoi("19.7")=19
  • 相关阅读:
    Beta 冲刺(1/7)
    福大软工 · 第十次作业
    11111111
    101
    7
    6
    5
    4
    p
    b2
  • 原文地址:https://www.cnblogs.com/ricks/p/9399795.html
Copyright © 2011-2022 走看看