Cross compile Go on OSX?

前端 未结 6 1677
生来不讨喜
生来不讨喜 2020-12-02 03:39

I am trying to cross-compile a go app on OSX to build binaries for windows and linux. I have read everything what I could find on the net. Closest example that I have found

6条回答
  •  时光说笑
    2020-12-02 04:16

    If you use Homebrew on OS X, then you have a simpler solution:

    $ brew install go --with-cc-common # Linux, Darwin, and Windows
    

    or..

    $ brew install go --with-cc-all # All the cross-compilers
    

    Use reinstall if you already have go installed.

提交回复
热议问题