android 编译出来的执行文件 not executable: magic 7F45

想在将一个开源库移植到android上,因为之前做过一个移植,是直接将编译出的可执行文件放到目录下,然后再调用exec执行的。这次也想那样做,可是报了上面这个错误。

通过,google,发现,上面错误的含义为:

Magic number 7F45 specifies the Executable and Linkable Format (ELF) file type, a format that is not executable on ARM processors.

Reason could be either improper cross compilation or either using wrong toolchain.

因此,我们要将gcc及target等换成 arm架构的。

你可能感兴趣的:(Android相关,Linux相关)