I've written a hello world program in C on a Linux machine. The compilation was done using a toolchain arm-none-eabi-gcc
(that I will later use for cross compilation). But I would like to test the execution of this application on the same machine before advancing any further. However, when the executable is created after the compilation, I try to execute using ./hello
but I receive the error
我在Linux机器上用C编写了一个hello world程序。编译通过使用工具链arm-none-eabi-gcc(我以后将用于交叉编译)完成。但是我想在继续推进之前在同一台机器上测试这个应用程序的执行情况。但是,当在编译后创建可执行文件时,我尝试使用./hello,但是我收到了错误。
bash: ./hello: cannot execute binary file
How do I execute then an executable that was compiled with the aformentioned toolchain?
如何执行由aformentioned工具链编译的可执行文件?
1 个解决方案
#1
3
Copy the executable to the machine which runs the arm-none-eabi-gcc compiler and execute it . Or in the emulators .
将可执行文件复制到运行arm-none-eabi-gcc编译器的机器上并执行它。或者在模拟器中。
#1
3
Copy the executable to the machine which runs the arm-none-eabi-gcc compiler and execute it . Or in the emulators .
将可执行文件复制到运行arm-none-eabi-gcc编译器的机器上并执行它。或者在模拟器中。