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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM