I am trying to run demo file at https://github.com/golang-ui/nuklear/blob/master/cmd/nk-example-sdl2/main.go but I am getting following error:
# command-line-arguments
./nk_nuclear_gui.go:72: undefined: MustAsset
./nk_nuclear_gui.go:126: undefined: flag
./nk_nuclear_gui.go:129: undefined: flag
I believe MustAsset is part of Reckon package which I installed, but error persists. Where is the problem and how can I solve it?
Edit: Both commands go build main.go
and go run main.go
give this error. Even go build
without any filename is also giving this error as discussed in comments.
I had encountered this problem while installing nuklear package.
I am running following version on Debian Stable Linux:
go version go1.7.4 linux/amd64
I installed latest version (go version go1.10.3 linux/amd64
) from https://golang.org/doc/install but the error persists.
Edit: The directory structure of go
directory is as follows:
$ tree -d
.
├── pkg
│ └── linux_amd64
│ └── github.com
│ ├── golang-ui
│ │ └── nuklear
│ └── xlab
└── src
└── github.com
├── go-gl
│ ├── gl
│ │ ├── all-core
│ │ │ └── gl
│ │ ├── v2.1
│ │ │ └── gl
│ │ ├── v3.1
│ │ │ └── gles2
│ │ ├── v3.2-compatibility
│ │ │ └── gl
│ │ ├── v3.2-core
│ │ │ └── gl
│ │ ├── v3.3-compatibility
│ │ │ └── gl
│ │ ├── v3.3-core
│ │ │ └── gl
│ │ ├── v4.1-compatibility
│ │ │ └── gl
│ │ ├── v4.1-core
│ │ │ └── gl
│ │ ├── v4.2-compatibility
│ │ │ └── gl
│ │ ├── v4.2-core
│ │ │ └── gl
│ │ ├── v4.3-compatibility
│ │ │ └── gl
│ │ ├── v4.3-core
│ │ │ └── gl
│ │ ├── v4.4-compatibility
│ │ │ └── gl
│ │ ├── v4.4-core
│ │ │ └── gl
│ │ ├── v4.5-compatibility
│ │ │ └── gl
│ │ ├── v4.5-core
│ │ │ └── gl
│ │ ├── v4.6-compatibility
│ │ │ └── gl
│ │ └── v4.6-core
│ │ └── gl
│ └── glfw
│ ├── scripts
│ ├── v3.0
│ │ └── glfw
│ ├── v3.1
│ │ └── glfw
│ │ └── glfw
│ │ ├── deps
│ │ │ ├── EGL
│ │ │ ├── GL
│ │ │ ├── glad
│ │ │ └── KHR
│ │ ├── include
│ │ │ └── GLFW
│ │ └── src
│ └── v3.2
│ └── glfw
│ └── glfw
│ ├── deps
│ │ ├── glad
│ │ ├── KHR
│ │ ├── mingw
│ │ └── vulkan
│ ├── include
│ │ └── GLFW
│ └── src
├── golang-ui
│ └── nuklear
│ ├── assets
│ ├── cmd
│ │ ├── nk-android
│ │ │ ├── android
│ │ │ │ └── jni
│ │ │ └── assets
│ │ ├── nk-example
│ │ │ └── assets
│ │ └── nk-example-sdl2
│ │ └── assets
│ └── nk
└── xlab
└── closer
└── cmd
├── example
├── example-error
├── example-fatalln
└── example-panic