Fix Android

This commit is contained in:
Milan Nikolic 2020-09-03 23:22:07 +02:00
parent 5c9b8d4089
commit 93578e2437
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
3 changed files with 5 additions and 2 deletions

View file

@ -18,7 +18,7 @@ Export sysroot path:
And compile shared library:
CC=arm-linux-androideabi-gcc \
CGO_CFLAGS="-I${ANDROID_SYSROOT}/usr/include --sysroot=${ANDROID_SYSROOT}" \
CGO_CFLAGS="-I${ANDROID_SYSROOT}/usr/include --sysroot=${ANDROID_SYSROOT} -D__ANDROID_API__=16" \
CGO_LDFLAGS="-L${ANDROID_SYSROOT}/usr/lib --sysroot=${ANDROID_SYSROOT}" \
CGO_ENABLED=1 GOOS=android GOARCH=arm \
go build -buildmode=c-shared -ldflags="-s -w -extldflags=-Wl,-soname,libexample.so" \