To build the executables in 64-bits from this Go code (assuming you are on MacOS):
(for MacOS)
$ GOOS=darwin GOARCH=amd64 go build -o bin/redacted main.go
(for Linux)
$ CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC="x86_64-linux-musl-gcc" go build -o bin/redacted-linux --ldflags '-w -linkmode external -extldflags "-static"' main.go
(for Windows)
$ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC="x86_64-w64-mingw32-gcc" go build -o bin/redacted.exe main.go
© 2023-2024 Cyril Dever. All right reserved.