Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gomobile example bind error #22818

Closed
wighawag opened this issue Nov 20, 2017 · 1 comment
Closed

gomobile example bind error #22818

wighawag opened this issue Nov 20, 2017 · 1 comment

Comments

@wighawag
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.1 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\wighawag\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\wighawag\AppData\Local\Temp\go-build007857451=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

What did you do?

assuming the mobile example and gomobile has been installed :

gomobile bind -target=android golang.org/x/mobile/example/bind/hello

I get the following error:

gomobile: go build -pkgdir=C:\Users\wighawag\go\pkg\gomobile/pkg_android_arm64 -buildmode=c-shared -o=C:\Users\wighawag\AppData\Local\Temp\gomobile-work-591065323\android\src\main\jniLibs\arm64-v8a\libgojni.so C:\Users\wighawag\AppData\Local\Temp\gomobile-work-591065323\androidlib\main.go failed: exit status 2
# _/C_/Users/wighawag/AppData/Local/Temp/gomobile-work-591065323/gomobile_bind
seq_android.c:213:3: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
seq_android.c:213:3: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
@wighawag
Copy link
Author

This is a duplicate of #22766
and the comment there fixed it for me

@golang golang locked and limited conversation to collaborators Nov 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants