[bug] Building on Windows not working
Closed this issue · 3 comments
luchongk commented
What happend?
Followed the installation and build steps for Windows in the README.
Getting this output when trying to build:
go build -ldflags "-s -w -H=windowsgui -extldflags=-static" .
package ips/terminal3_installer
imports github.com/AllenDang/giu
imports github.com/AllenDang/cimgui-go/backend/glfwbackend: build constraints exclude all Go files in C:\Users\Luchong\go\pkg\mod\github.com\!allen!dang\cimgui-go@v1.0.1\backend\glfwbackend
Code example
package main
import (
"fmt"
"github.com/AllenDang/giu"
)
func onClickMe() {
fmt.Println("Hello world!")
}
func onImSoCute() {
fmt.Println("Im sooooooo cute!!")
}
func loop() {
giu.SingleWindow().Layout(
giu.Label("Hello world from giu"),
giu.Row(
giu.Button("Click Me").OnClick(onClickMe),
giu.Button("I'm so cute").OnClick(onImSoCute),
))
}
func main() {
wnd := giu.NewMasterWindow("Hello world", 400, 200, giu.MasterWindowFlagsNotResizable)
wnd.Run(loop)
}
To Reproduce
- Try to build on Windows
Version
master
OS
Windows 10
gucio321 commented
- does your go.mod tell anything about
cimgui-go
version - did you remember to enable CGO? (
CGO_ENABLED=1
)
gucio321 commented
ok, I consider this fixed.
LMK if it still doesn't work for you.