3 ms·
If you build under the new Linux subsystem, you'll get a Linux binary. That's not a good solution if you want to build a Windows binary.
by wtetzner 9y ago
If you build under the new Linux subsystem, you'll get a Linux binary. That's not a good solution if you want to build a Windows binary.
- asveikau 9y agoNote I didn't say anything about what compiler will be used or commands actually run. Make just calls the shell. If the shell runs stuff that produces Windows binaries you get Windows binaries. (Assuming they fixed the Linux subsystem in a way that execve(2) works on Windows binaries, which I heard in the first version they didn't have working, then there should be no problems.)
- rcarmo 9y agoYou can cross-compile, and I’ve done it a couple of times without any issues: https://github.com/golang/go/wiki/WindowsCrossCompiling https://github.com/golang/go/wiki/WindowsCrossCompiling