golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
https://github.com/vurtun/nuklear
MIT License
1.57k stars 98 forks source link

Example code does not work? #91

Open arjunmenon opened 1 month ago

arjunmenon commented 1 month ago

Hey, i am getting this

> go build .
github.com/go-gl/gl/v3.2-core/gl
github.com/golang-ui/nuklear/nk
# github.com/golang-ui/nuklear/nk
cgo-dwarf-inference:1:17: error: expected '{' before ')' token

was checking the nk-example.

sp-manuel-jurado commented 15 hours ago

The same happens to me.

Build example:

...
go: downloading github.com/getlantern/systray v1.2.2
go: downloading github.com/golang-ui/nuklear v0.0.0-20231115163627-2440a671efc5
...
go: downloading github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71
go: downloading github.com/go-gl/glfw v0.0.0-20240506104042-037f3cc74f2a
...
# github.com/getlantern/systray
# [pkg-config --cflags  -- ayatana-appindicator3-0.1]
...
# github.com/go-gl/glfw/v3.2/glfw
...
# github.com/golang-ui/nuklear/nk
cgo-dwarf-inference:1:17: error: expected '{' before ')' token
2024/07/16 15:18:55 Failed to cross compile package: exit status 1.

Import go example:

import (
    "github.com/go-gl/gl/v3.2-core/gl"
    "github.com/go-gl/glfw/v3.2/glfw"
    "github.com/golang-ui/nuklear/nk"
)

Notes: