GOLANG编译安装

GO这个编译器搞的比较混乱,GO本身是汇编+C开发出来的,后来因为觉得自己牛逼,然后用GO语言又写了一次编译器,所以中途抛弃了C,不过这种做法好与不好很难说,go真的这么有自信用自己语言写自己的编译器更好?

先不说鸡蛋先好,还是鸡先有好,先看怎么能编译出来。

版本介绍

go1.4.x编译器用c写的,所以安装gcc编译安装即可。

export GOROOT=/usr/local/go1.4/bin

cd /usr/local/go1.4/src

./make.bash

源码在golang官方可以下载到最新的,

然后下载最新的go.1.8.1,并解压到/usr/local/go1.8。

export GOROOT=/usr/local/go1.8

export GO_BOOTSTRAP=/usr/local/go1.4

cd /usr/local/go1.8/src

yum install -y bzip bzip-devel

GOOS=linux GOARCH=ppc64 ./bootstrap.bash

./make.bash

download esclipse

              help->insetall and update   input the http://goclipse.github.io/releases/ from (https://github.com/GoClipse/goclipse/blob/latest/documentation/Installation.md#installation)

             check goeslicpse

             next ->next

download go for windows msi ->install

windows->perference->go->goroot ->c:go

download gocode   解压 go build

godef编译

git clone https://github.com/rogpeppe/godef.git

git clone https://github.com/9fans/go 9fans.net/go

go build github.com/rogpeppe/godef

guru 转到工具

cd c:goin

go get golang.org/x/tools/cmd/guru
go build golang.org/x/tools/cmd/guru

gdb

下载:https://sourceforge.net/projects/liteide/

这回直接是二进制的,直接用exe即可.

done !

原文地址:https://www.cnblogs.com/a-xu/p/6768107.html