Penulis Topik: trik compile sederhana Golang (Windows)  (Dibaca 1592 kali)

Offline descrates

  • Pro500
  • ******
  • Tulisan: 620
  • Reputation: 5073
    • Lihat Profil
trik compile sederhana Golang (Windows)
« pada: Pebruari 07, 2017, 11:58:59 AM »
1. C:\go\pkg\tool\windows_386\compile.exe foo.go
2. C:\go\pkg\tool\windows_386\link.exe -w -s foo.go.o
3. C:\go\pkg\tool\windows_386\ren a.out foo.exe

kalo aplikasi kompleks ya grabbing dulu, sejauh ini gw lakuin itu
lebih enak daripada pake "go build"
TASKKILL /F /IM SMΔRTP.exe /T

Win7 32bit [kernel patch] --- 2x2,8GHz Intel --- 8GB RAM DDR3 --- 512MB 9600M GT NVidia --- Iron 15 beta --- Opera Mini Proxies

other OS: Lucid Puppy, XP SP2 [custom], XP SP3, Win7 64bit, Tails

Offline descrates

  • Pro500
  • ******
  • Tulisan: 620
  • Reputation: 5073
    • Lihat Profil
Re:trik compile sederhana Golang (Windows)
« Jawab #1 pada: Pebruari 19, 2017, 12:43:28 PM »
kalo mau cross compile (go 1.7)

C:\go\bin\SET GOOS=linux (ato darwin)
C:\go\bin\SET GOARCH=amd64
C:\go\bin\go build foo.go

kalo mau compile banyak versi dan cepet bikin aja batch file
TASKKILL /F /IM SMΔRTP.exe /T

Win7 32bit [kernel patch] --- 2x2,8GHz Intel --- 8GB RAM DDR3 --- 512MB 9600M GT NVidia --- Iron 15 beta --- Opera Mini Proxies

other OS: Lucid Puppy, XP SP2 [custom], XP SP3, Win7 64bit, Tails