Fix Android
This commit is contained in:
parent
5c9b8d4089
commit
93578e2437
3 changed files with 5 additions and 2 deletions
|
@ -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" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue