This is a creation in Article, where the information may have evolved or changed.
I recently need to study Ethereum, research, choose to compile Go-ethereum
Under Windows, the GO package is installed in C:\GO. Environment variables are set in environment variables Goroot=c:\go
Also set the working directory of Go (I used C:\GOWORK), environment variables set environment variable gopath=c:\gowork.
First, install chocolatey.
Start the PowerShell prompt window as an administrator and execute
Set-executionpolicy Remotesigned-scope CurrentUser
And then run
IWR https://chocolatey.org/install.ps1-UseBasicParsing | Iex
After installing chocolatey, the second step installs the Go-ehtereum environment: git, Golang, MinGW. Because I already have git and Golang installed. I only run the following command
Choco Install MinGW
Step three, configure the compilation environment
Open a new command window and run the following command:
Set "Gopath=c:\gowork"
Set "path=c:\gowork\bin;%path%"
Setx Gopath "%gopath%"
Setx Path "%Path%"
mkdir Src\github.com\ethereum
git clone https://github.com/ethereum/go-ethereum Src\github.com\ethereum\go-ethereum
CD Src\github.com\ethereum\go-ethereum
Go get-u-v golang.org/x/net/context
The final compilation, in the C:\GOWORK\src\github.com\ethereum\go-ethereum directory, runs
Go install-v./...
Hola, Exe file generation:
issues encountered in the compilation:
The author two-dimensional code
Note: Original, reproduced please indicate the source