Skip to content

Instantly share code, notes, and snippets.

View DavidVorick's full-sized avatar

David Vorick DavidVorick

View GitHub Profile
@steeve
steeve / _readme.md
Last active March 7, 2024 12:38
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

how to into git (and GitHub)

This is a handy reference for setting up and using git to contribute to projects on GitHub. It is by no means a complete guide to using git; use http://gitref.org for that.

Update: This site provides some excellent visualizations of what various git commands do. Highly recommended.

basics

setup

First run the following commands, using your real name and GitHub email address: