FAQ
Ah yes, you're right. The lang package is exposing several gobind
bugs. I'll file them and get on fixing them. Thanks.

On Tue, Aug 25, 2015 at 12:57 PM, Gaurav Menghani
wrote:
Thanks for the reply David!

Yes, it compiles fine. The structure of the code is I have:

eclisp.go: package main, builds an executable shell, which uses the
lang package.
lang/: package lang, which is what I want to compile into a library.

You can try it yourself here `go get github.com/reddragon/eclisp && cd
$GOPATH/src/github.com/reddragon/eclisp && go build`. I don't have
anything fancy in the building, so I am guessing everything gets
compiled.

The errors that gomobile bind is throwing are referring to
non-exported methods. If they are referred to outside the package,
they will obviously be a problem. I am wondering why gomobile needs to
do that. I have knowingly made non-essential methods be within the
scope of the package because gomobile complains about various return
types / data types not being supported yet.

Also, it will be very helpful if gomobile could also point to the file
and line number where the error was found. For example, in the first
stage of errors, when it was complaining about unsupported types /
return values, I would have to find where the error was coming from.

Thank you!
On Tue, Aug 25, 2015 at 9:35 AM, David Crawshaw wrote:
After generating wrappers, the gomobile bind command compiles your
program. The errors you are seeing appear to be from the compiler.
Does your code compile? Perhaps you have some build tags protecting
code that usually isn't compiled, but is when you target iOS?

The warning building the mobileinit package doesn't appear on my
system, but I sent cl/13918 to remove it.

On Sun, Aug 23, 2015 at 5:31 AM, Gaurav Menghani
wrote:
I am trying to create an iOS library out of
`github.com/reddragon/eclisp/lang` go package. It only has two types
exported `Atom` and `Value`, and only one method exported `func Eval(exp
string, env *LangEnv) *Atom`. However, the `gomobile bind` command gave me a
bunch of "unsupported" errors initially, which I fixed by simply unexporting
those types / methods.

Now, while the rest of the package builds fine, I am getting weird errors
with the gomobile bind command, wherein, it seems like non-exported methods
of my package are being called and the command is failing. Have a look here:
http://pastebin.com/ZAQrrkva

I would be grateful if someone can point out what am I doing wrong here?

Thanks!

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Gaurav Menghani
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 23, '15 at 9:31a
activeAug 25, '15 at 6:02p
posts5
users2
websitegolang.org

2 users in discussion

Gaurav Menghani: 3 posts David Crawshaw: 2 posts

People

Translate

site design / logo © 2021 Grokbase