walk icon indicating copy to clipboard operation
walk copied to clipboard

Windows 10 to go build err

Open cnchef opened this issue 4 years ago • 2 comments

PS E:\go\xlsl\gui> ls

目录: E:\go\xlsl\gui

Mode LastWriteTime Length Name


-a---- 2020/12/4 星期五 16:0 1069 rsrc.syso 6 -a---- 2020/12/4 星期五 16:0 889 test.manifest 0 -a---- 2020/12/4 星期五 15:5 627 walktest1.go 8

PS E:\go\xlsl\gui> go build # golang.org/x/sys/windows E:\go\src\golang.org\x\sys\windows\exec_windows.go:94:28: cannot use buf[:n] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:50:26: cannot use b[:n] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:221:29: cannot use db (type []uint16) as type uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:241:56: cannot use ([256]uint16)(unsafe.Pointer(s))[:] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:278:24: cannot use b (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:278:42: cannot use db (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:460:24: cannot use b (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\syscall_windows.go:86:14: cannot range over s (type *uint16) E:\go\src\golang.org\x\sys\windows\syscall_windows.go:88:9: cannot slice s (type *uint16) E:\go\src\golang.org\x\sys\windows\syscall_windows.go:92:28: cannot use s (type *uint16) as type []uint16 in argument to utf16.Decode E:\go\src\golang.org\x\sys\windows\syscall_windows.go:92:28: too many errors PS E:\go\xlsl\gui> go build -ldflags="-H windowsgui" # golang.org/x/sys/windows E:\go\src\golang.org\x\sys\windows\exec_windows.go:94:28: cannot use buf[:n] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:50:26: cannot use b[:n] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:221:29: cannot use db (type []uint16) as type uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:241:56: cannot use ([256]uint16)(unsafe.Pointer(s))[:] (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:278:24: cannot use b (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:278:42: cannot use db (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\security_windows.go:460:24: cannot use b (type []uint16) as type *uint16 in argument to UTF16ToString E:\go\src\golang.org\x\sys\windows\syscall_windows.go:86:14: cannot range over s (type *uint16) E:\go\src\golang.org\x\sys\windows\syscall_windows.go:88:9: cannot slice s (type *uint16) E:\go\src\golang.org\x\sys\windows\syscall_windows.go:92:28: cannot use s (type *uint16) as type []uint16 in argument to utf16.Decode E:\go\src\golang.org\x\sys\windows\syscall_windows.go:92:28: too many errors PS E:\go\xlsl\gui>

cnchef avatar Dec 04 '20 08:12 cnchef

Could you maybe provide us the walktest1.go file content ?

alkanna avatar Jan 11 '21 11:01 alkanna

You should update golang.org/x/sys

evangwt avatar Jan 12 '21 03:01 evangwt