Running any simple "Hello, world!" that uses cgo on a (current as of today) stock cygwin generates an error:
$ go version go version go1.16.5 windows/amd64 $ go test -run TestCamera # runtime/cgo gcc_libinit_windows.c: In function ‘x_cgo_sys_thread_create’: gcc_libinit_windows.c:58:12: error: implicit declaration of function ‘_beginthre ad’ [-Werror=implicit-function-declaration] 58 | thandle = _beginthread(func, 0, arg); | ^~~~~~~~~~~~ cc1: all warnings being treated as errors
Is go not supported on cygwin for some reason? Or, how can I fix this?
example code: literally any cgo, for example https://github.com/kyleconroy/hello-cgo/blob/master/hello.go