This is a creation in Article, where the information may have evolved or changed.
1, the use of cross-compilation in the Windows environment, the need to compile the tool GCC, the recommended use of MinGW:
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/ Mingw-get-inst-20120426.exe/download
Run MinGW installation Mannger after installation is complete
Select Install mingw32-ggc-g++
Set environment variables after installation, add C:\MinGW\bin (install directory) to System environment variable path
2, in the Golang installation directory under the C:\GO\SRC directory to create a new Cc.bat file, the contents are as follows:
05 |
call make.bat --no-clean |
08 |
call make.bat --no-clean |
11 |
call make.bat --no-clean |
14 |
call make.bat --no-clean |
15 |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
20 |
call make.bat --no-clean |
21 |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
26 |
call make.bat --no-clean |
27 |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
31 |
go get github.com/nsf/gocode |
When you're done, double-click Run batch File
3, open liteide x21 Select Cross-compilation environment
Then compile the program and find the Linux executable in the source file directory to successfully build the
http://my.oschina.net/xlplbo/blog/209641