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

x/mobile/cmd/gomobile: can't recognition bool #22875

Closed
wpajqz opened this issue Nov 25, 2017 · 2 comments
Closed

x/mobile/cmd/gomobile: can't recognition bool #22875

wpajqz opened this issue Nov 25, 2017 · 2 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@wpajqz
Copy link

wpajqz commented Nov 25, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.9.2 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="/Users/Paul/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Paul/gopkg:/Users/Paul/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/go-build794677240=/tmp/go-build -gno-record-gcc-switches -fno-common"
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"### What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

type Client struct {
debug bool
}

func (c *Client) SetDebug(bool bool) {
c.debug = bool
}

What did you expect to see?

What did you see instead?

go build -pkgdir=/Users/Paul/gopkg/pkg/gomobile/pkg_darwin_arm -tags ios -buildmode=c-archive -o /var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/gomobile-work-341500227/export-arm.a /var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/gomobile-work-341500227/src/iosbin/main.go failed: exit status 2

_/var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/gomobile-work-341500227/src/gomobile_bind

In file included from Export.m:9:
/var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/gomobile-work-341500227/src/gomobile_bind/Export.objc.h:86:24: error: expected identifier
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/stdbool.h:31:14: note: expanded from macro 'bool'
In file included from Export.m:9:
/var/folders/59/jdr4qmx15h17wq4d20hjkbq00000gn/T/gomobile-work-341500227/src/gomobile_bind/Export.objc.h:86:24: error: expected ';' after method prototype
Export.m:184:24: error: expected identifier
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/stdbool.h:31:14: note: expanded from macro 'bool'
Export.m:184:24: error: expected method body
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/stdbool.h:31:14: note: expanded from macro 'bool'

@wpajqz
Copy link
Author

wpajqz commented Nov 25, 2017

type Client struct {
debug bool
}

func (c *Client) SetDebug(b bool) {
c.debug = b
}

it's ok when I run gomobile bind -target=ios

@wpajqz wpajqz changed the title gomobile cant recognition bool gomobile: cant recognition bool Nov 25, 2017
@bradfitz bradfitz changed the title gomobile: cant recognition bool x/mobile/cmd/gomobile: can't recognition bool Nov 25, 2017
@gopherbot gopherbot added this to the Unreleased milestone Nov 25, 2017
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Nov 25, 2017
@gopherbot
Copy link

Change https://golang.org/cl/100795 mentions this issue: bind: add nil and bool to ObjC keyword list

@golang golang locked and limited conversation to collaborators Mar 21, 2019
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
While we're here, sort the keyword list.

Fixes golang/go#22875

Change-Id: I31844c3d66f959bb0dc47eb3062e41f75d7b765e
Reviewed-on: https://go-review.googlesource.com/100795
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
While we're here, sort the keyword list.

Fixes golang/go#22875

Change-Id: I31844c3d66f959bb0dc47eb3062e41f75d7b765e
Reviewed-on: https://go-review.googlesource.com/100795
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

2 participants