Expectation is to build this app for Android Platform, just like other platforms and should be able to run.
What did you see instead?
I see build errors as below:
# command-line-arguments
./main.go:7: error: undefined reference to 'getsid'
./main.go:7: error: undefined reference to 'getsid'
clang70: error: linker command failed with exit code 1 (use -v to see invocation)
# command-line-arguments
./main.go:7:12: warning: implicit declaration of function 'getsid' is invalid in C99 [-Wimplicit-function-declaration]
Commands:
GOOS=android GOARCH=arm GOROOT=/usr/lib/go CGO_ENABLED=1 CC=/home/mhirpara/work/go/pkg/gomobile/ndk-toolchains/arm/bin/arm-linux-androideabi-gcc go build main.go
OR
gomobile build -x -target=android github.com/mehulhirpara/learning/cgo-getsid
The text was updated successfully, but these errors were encountered:
mehulhirpara
changed the title
Failed to build GO app for android platform
x/mobile: Failed to build GO app for android platform
Dec 20, 2018
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Trying to compile below GO app, which include C calls, for android platform.
What did you expect to see?
Expectation is to build this app for Android Platform, just like other platforms and should be able to run.
What did you see instead?
I see build errors as below:
Commands:
The text was updated successfully, but these errors were encountered: