Configure Eclipse + Go environment under windows

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

2012-03-31: The new version of Goclipse has been greatly improved, and some of the content in this article is outdated.

1. Download the installation package for go under Windows:

Https://code.google.com/p/go/downloads/list

You can also download the source code and compile it with MinGW. Configure the MINGW environment first, then run the All.bat.

mingw:http://www.mingw.org/

2. Download Gocode, for go full tip:

Gocode's GitHub Address:

Https://github.com/nsf/gocode

To install Git, under Windows, you typically use Msysgit.

https://code.google.com/p/msysgit/

Install again under cmd:

Go get-u github.com/nsf/gocode

You can also download the code and compile it directly with go build, which generates Gocode.exe.

3. Install the plugin in eclipse:

Http://code.google.com/p/goclipse/wiki/InstallationInstructions

4. Configure the plugin:

(1). Configure the Go Compiler

(2). Configure Gocode (optional), here I use the Eclipse plugin comes with the gocode.

(3). Configure GDB to make a trial (optional)

If MinGW is installed, you can find gdb under the installation directory.

5. Whether the test was successful

Create a new Go project and build a hello.go. Such as:

GDB debugs as follows (to debug with the input command in the console):

6. Other

March 31, 2012:

Currently this eclipse plugin can only be run with the code in the CMD package.

It seems that the popular is sublime Text2 + Gocode. Sublime text is also quite useful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.