go-enet
go-enet copied to clipboard
Builds fail in Windows 11
Trying to build example code in the readme, and it is refusing to build. Are you sure there are no dependencies for Windows machines?
Do you have the imports at the top? Also did you make sure the module is actually in go.mod?
Yep! Line 4 in server.go: import "github.com/codecat/go-enet"
Line 7 In go.mod, require github.com/codecat/go-enet v0.0.0-20230124183417-a8586e7e37c4 (built by Goland)
My professor was able to build it on both of his unix machines without issue.
More info failure occurs on Windows 11 Go 1.21
I have the exact same issue on Windows 10 Go version 1.21.6.
@matzi8qr @jsantore
I was able to get past this today by making sure gcc was in my Windows path. I had removed my old version of msys64 and installed a new version in a different path, so gcc was not reachable by the go build tools. Adding my msys64 bin directory to my PATH variable got me through this compile issue. Give it a shot.
~~I've added msys64 to my path, and gcc is accessible in the terminal. Still gives the same error on go run~~
Scratch that, I'm just bad. Turns out I had the wrong directory in my PATH which pointed to an empty script. Make sure to actually install gcc via the MSYS2 Pacman, and then add the ucrt64\bin to your path.
Once I did that, as @Jldevictoria noted, it works fine