Skip to content

Instantly share code, notes, and snippets.

@reuniware
Created January 29, 2021 15:15
Show Gist options
  • Save reuniware/a954f07e2a5066d59a9fb4fa16592f4e to your computer and use it in GitHub Desktop.
Save reuniware/a954f07e2a5066d59a9fb4fa16592f4e to your computer and use it in GitHub Desktop.
Native C android app compilation
c:\TEMP>C:\Users\USER001\AppData\Local\Android\Sdk\ndk\22.0.7026061\toolchains\llvm\prebuilt\windows-x86_64\bin\armv7a-linux-androideabi30-clang test.c
C:\Users\USER001\AppData\Local\Android\Sdk\platform-tools>adb push c:\temp\a.out /data/local/tmp
c:\temp\a.out: 1 file pushed, 0 skipped. 0.8 MB/s (4208 bytes in 0.005s)
C:\Users\USER001\AppData\Local\Android\Sdk\platform-tools>adb shell chmod 777 /data/local/tmp/a.out
C:\Users\USER001\AppData\Local\Android\Sdk\platform-tools>adb shell /data/local/tmp/a.out
WARNING: linker: /data/local/tmp/a.out: unsupported flags DT_FLAGS_1=0x8000001
hello world!
Content of test.c :
#include <stdio.h>
int main(void) {
puts("hello world!");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment