在ubuntu上使用g++编译应用程序,再adb push到nanopc-t4之后执行
报错:
/system/bin/sh: ./tcp-client: not executable: 64-bit ELF file
原因是需要使用交叉编译工具进行编译:
下载gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz,下载地址
再次执行,
报错:
/system/bin/sh: ./tcp-client-gcc: No such file or directory
g++指令添加–static
再次执行,成功!