w32 icon indicating copy to clipboard operation
w32 copied to clipboard

Unable to Use for cross compiling

Open Merith-TK opened this issue 4 years ago • 1 comments

# github.com/AllenDang/w32
/home/developer/go/src/github.com/AllenDang/w32/advapi32.go:15:16: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/alpc.go:15:13: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/comctl32.go:13:16: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/comdlg32.go:13:16: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/create_process.go:13:13: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/dwmapi.go:21:14: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/fork.go:37:10: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/gdi32.go:13:13: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/gdiplus.go:92:15: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/kernel32.go:13:16: undefined: syscall.NewLazyDLL
/home/developer/go/src/github.com/AllenDang/w32/gdiplus.go:92:15: too many errors

when i try to goget for my archlinux machine

Merith-TK avatar Oct 30 '19 17:10 Merith-TK

You have to set the environment variable

GOOS=windows

before calling go build or go run. This tells Go that you want to build for windows. The syscall package only has NewLazyDLL etc. on Windows. syscall is OS specific.

gonutz avatar Apr 19 '20 11:04 gonutz