To compile something make a test program e.g.:
Commands I used to install Go language (golang) on Ubuntu amd64:sudo apt-get install mercurial bison gcc libc6-dev ed make
cd ~
export GOROOT=$HOME/go
export GOARCH=amd64
export GOOS=linux
mkdir $HOME/gobin
export GOBIN=$HOME/gobin
export PATH=$PATH:$GOBIN
hg clone -r release https://go.googlecode.com/hg/ $GOROOT
cd $GOROOT/src
./all.bash
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
and compile with:8g test.go ;8l test.8 ;./8.out
2 comments:
I found this post to be quite helpful - thanks. Any reason why the mercurial line is commented out?
Thanks, I find your blog useful too! :) mercurial shouldn't be commented out, fixed.
Post a Comment