-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/mobile: No type or protocol named 'goSeqRefInterface' #24343
Comments
Can you provide more specific steps to reproduce the problem? On my setup (mac mini, macOS 10.13, Xcode 9.2), this works and produces a Hello.framework:
|
Thanks @eliasnaur . |
I was importing with |
I ran into this too while trying to auto generate c# API definitions for a go package framework generated with gomobile, and adding the missing include fixed it. If adding this missing include doesn't cause any problems, I don't see any harm in doing so. |
Please open a new issue with steps to reproduce the error. Thanks. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/alvatar/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/alvatar/go/"
GORACE=""
GOROOT="/Users/alvatar/go/go1.10"
GOTMPDIR=""
GOTOOLDIR="/Users/alvatar/go/go1.10/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mf/9y9xgfm910lg169q75sp1f5w0000gn/T/go-build610131228=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Generate Go bindings with
gomobile bind -target ios <package>
, then import it, configure it, and call any of the Go functions from ObjCWhat did you expect to see?
A correct build
What did you see instead?
Universe.objc.h:22:37: No type or protocol named 'goSeqRefInterface'
The solution was to include
#include "ref.h"
in Universe.objc.h, so I suppose the fix is just to add this to the code generator?
The text was updated successfully, but these errors were encountered: