Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:ressources:astuces:golang [2014/04/25 14:59]
en:ressources:astuces:golang [2014/04/25 14:59] (current)
Line 1: Line 1:
 +====== Golang tips ======
  
 +===== Building for multiple platforms =====
 +
 +Check out the source, and from the **src** directory, run the following loop:
 +
 +<​code>​
 +$ for os in linux darwin windows; do for arch in 386 amd64; do echo ===== building $os/$arch =====; sleep 3; GOARCH=$arch GOOS=$os ./make.bash --no-clean 2>&1 ; done ;done
 +</​code>​
 +
 +Then, to cross compile:
 +
 +<​code>​
 +$ GOARCH=386 GOOS=windows go build maxproc.go
 +
 +$ file maxproc.exe ​
 +maxproc.exe:​ PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
 +</​code>​
en/ressources/astuces/golang.txt ยท Last modified: 2014/04/25 14:59 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0