# Cross-compiling Go

DevFeed: [Cross-compiling Go](<https://devfeed.tech/articles/cross-compiling-go-37693.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/cross-compile-go/>)

Author: Carlos Alexandro Becker

Published: 2015-06-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Script](<https://devfeed.tech/topics/script.md>)

Tags: [github](<https://devfeed.tech/tags/github.md>), [go](<https://devfeed.tech/tags/go.md>), [linux](<https://devfeed.tech/tags/linux.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [script](<https://devfeed.tech/tags/script.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

This tutorial explains how to cross-compile a Go application for multiple operating systems and architectures using gox. It also describes automating builds, tests, tagging, and binary releases with a script.

## Source excerpt

go build generates a binary for the platform you run it in. So, if I build antibody in a Linux machine - which uses Mach-O, it will not work in OS X - which uses ELF.