golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.

Home Page:https://github.com/vurtun/nuklear

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not get nuklear with golang

TechComSpot opened this issue · comments

I did go get github.com/golang-ui/nuklear/cmd/nk-android

but got:

xlab/android-go/app/app.go:20:2: build constraints exclude all Go files in /home/r3mb0/GoMobile/src/github.com/xlab/android-go/app/internal/callfn
screenshot at 2018-06-21 10-01-22

Try cloning the repository

cd %GOPATH%\src\github.com
mkdir golang-ui
cd golang-ui
git clone https://github.com/golang-ui/nuklear.git

@jkvatne go get clones first, so it should be cloned, but not building, since nk-android must be built using Android SDK toolchain, not by go build targeting the host machine.

Thank you @jkvatne for response, but the thing is that git will clone repository, I almost sure about that, but it should be cloned by a golang by default, in other case it usually displays the error like "There is no go files . . . bla..bla", but it doesn't :(

@xlab I believe that what you saying is I should install Android SDK firstly, but I see that there is at least one go file called main.
screenshot at 2018-06-26 19-06-45

@r3mb00 these files include android-go package that targets android/arm, not linux, so all files are excluded, see the error message on the first screen.

Also, this project has an old way to build android APK that is no longer supported by the newest SDK, so in order to proceed, you must build it like an example from android-go https://github.com/xlab/android-go/blob/master/examples/build-android.sh

You're stepping onto WIP territory, so process with caution and expertise.

You're stepping onto WIP territory, so process with caution and expertise.

@xlab oh...yeah I see.

Sorry for stupid questions and issues but to run any golang android example for me is almost like a sence of life.

I'm struglling with that so long and gets nothing so I believe I won't hadle it myself without a help.

Hi @xlab @jkvatne @Noofbiz.

When execute build-android.sh script I got:
screenshot at 2018-06-29 11-37-52

main.go:7:2: cannot find package "github.com/xlab/android-go/app" in any of:
/usr/lib/go-1.10/src/github.com/xlab/android-go/app (from $GOROOT)
/root/go/src/github.com/xlab/android-go/app (from $GOPATH)
Can you help guys?
With cp manipulation I fix that errors but got internal callfine :(
screenshot at 2018-06-29 12-04-37

@xlab please help, I can't handle myself, sorry :(

@r3mb00 env exports like GOOS and GOARCH cannot be separated on different commands. You have to execute them in one script (e.g. Makefile) or multiline

@xlab thanks for response.

But I'm really cannot get it.

I executed build-android.sh script but env exports like GOOS and GOARCH are executed by separate commands in that script, right?

@r3mb00 no, they are in the same command, also it doesn't use sudo and the script differs very much from the screens you've provided above

https://github.com/xlab/android-go/blob/master/examples/build-android.sh