ECLIPSE+CDT+MINGW Installation Manual

Source: Internet
Author: User
Tags manual win32 zip


Original address: http://nknush.kh.edu.tw/~johnsirhp/Eclipse%2BCDT%2BMinGW.htm

ECLIPSE+CDT+MINGW Installation Manual


Jiang its medal

I've put all the necessary files in the high-school information Education Network and can go straight up to catch
Location in http://www2.nknush.kh.edu.tw/ComputerEducation/"ECLIPSE+CDT+MINGW-related kit"

In addition to being able to develop Java, Eclipse supports a number of languages and, of course, does not miss C + +, and now looks at how to use Eclipse to do the development of A/C + + program.
One of the main steps to using Eclipse to develop A/C + + program:

1. Install the JRE
Since Eclipse itself is developed in Java, it is naturally necessary to use the JRE, which is not required if it has been previously installed.
2. Install Eclipse
This is certainly not a problem, must be installed, otherwise how to use?
3. Hanging on Eclipse Chinese suite
If you don't mind using the English interface, this can be skipped
4. Hanging on the CDT
CDT is an external package that enables eclipse to develop a C/s + + program, and this is our protagonist, be sure!
5. Installation MinGW
This is to let your computer have GCC, g++, this is also necessary, otherwise how to edit?
6. Install C + + Formatter
The CDT does not have a format tool for the code, and it helps with this, and if you don't have this requirement, it can be used normally.

Detailed installation steps:

One, the installation of JRE 5.0

‧ Download Page: http://java.sun.com/j2se/1.5.0/download.jsp or up-to-top high School information Education Web download JRE version 5.0
‧ Click Download JRE 5.0 Update 5, click Accept and then select Window Platform "Windows Offline installation, multi-language"
‧ Install the installation after downloading.

Ii. installation of Eclipse
First into the Eclipse official website http://eclipse.org left linked Fields find Download currently 3.1 version has been release, but there is no Chinese culture suite, if you have a deep fear of English, first use version 3.0.x, in the Http://eclip Download the Eclipse 3.0.1 platform from the se.org or to the high-school information education web.
After downloading, unzip to the path you want to place, pull out the radius, and do not install.

Third, hanging on Eclipse Chinese suite
Same as in http://eclipse.org can find Chinese set nlpack-eclipse-sdk-3.0.x-win32.zip or up to high school information Education Web download Eclipse 3.01 Chinese Language pack
You can nlpack-eclipse-sdk-3.0.x-win32.zip the plugins and features to eclipse in the same catalogue. "
You should be able to see the Chinese language interface after you perform your work.
If you cannot see or have a small part of the culture, right-click on the "target" in your Eclipse linked fields and add-clean again to execute it!!
When the work is done, this-clean can be taken away.

Four, hanging on the CDT
Next, it's up to the CDT to be able to launch A/C + + program for Eclipse. To download the CDT first, download the Web address http://www.eclipse.org/cdt/to find the org.eclipse.cdt-2.1.1-win32.x86.zip or to the high School information Education Network download CDT 2.1.1
If your installation of Eclipse is version 3.0.x, you must install the CDT 2.1.1 Latest version
If the installation of Eclipse is version 3.1, you must install the CDT version 3.0

Installation: Copy the features, plugins, and the entire folder to eclipse information
, re-open eclipse.

When you set up a new project, you'll see that the C and C + + options are already in place, representing the success of the installation.
If you do not see it, add-clean as above.


V. Installation of MINGW
For now, the CDT has been installed for Eclipse, but a "translator" is needed to edit the program
So to download the GNU C, C + + translator that you can use on Windows, here's the following: MinGW.
Download Address: http://www.mingw.org/download.shtml
Find Mingw-3.1.0-1.exe or up-to-the-top high-school information in the downloads page download mingw-3.1.0-1
Ps:
Install: Install the C slot, and then always click "Next" on the line. The path after installation is like this, C:\MinGW.

Add the following settings to the environment variables:
Path:c:\mingw\bin;
Users of Windows want to use the "My Computer" right----"advanced--" environment variables----"edit"
Add C:\MinGW\bin at the front; Can.

Because in Eclipse, the name of the editor is Make.exe, but MinGW installed the name of the make file is Mingw32-make.exe
So you can rename Mingw32-make as make.

In order for the CDT to be able to take MinGW to the work of editing, we have to go back to Eclipse when we set
Preferences for Windows-->c/c++->make->new make Project->new Builder
Find Binary Parser cancel Elf Parser change PE Windows Parser

Six, installed C + + Formatter
The C + + Formatter is a tool for typesetting the C/s code, and to change to a messy code that has been changed, it's really a life-saving elixir to get the code back to the "elegant" state. Because the CDT editor is not built Formatter, other tools are used. Here we are going to use the artistic Style.
Astyle's web site is downloaded from the Http://sourceforge.net/projects/astyle astyle_1.15.3_win32.zip or to the high-school information education Web download Astyle_1.15.3_win32.zip
After decompression, put it in the appropriate position.

At Eclipse we have to use it with "external tools".

Execute--External tools--external tools ..., make the following settings:


 

Choose "Program", "new"
Name: Formatter

Position:
Press "Browse File system ..." To find the location of Astyle.exe.

Work record:
${workspace_loc:/${project_name}}

Arguments:
--style=kr ${resource_name}

Select "Close" after choosing

It has all been installed and finished.

And then we'll try to write a little program.

Managed make C/C + + Project--jianxin, Eclipse----




Click "Finish"




On the case test, right-click Add Source File
Take a source File name and remember to add the file name. cpp


Keys into this section of code

#include<iostream>
Using
namespace std;

int
Main () {
cout << "Hello world!" << Endl;
return 0;
}

If you want to format the code, click the External tool, "execute", and choose Formatter.

There are times when there is no response, so just switch to the window and the message box will appear.



Select "Yes" to take effect.

In the archives, the files will be self-editing.

Click "Execute" and execute as ...-> Local C + + application
You can see the results in the main console!!

Reference:
[Teaching] WINDOW+GCC+CDT with Eclipse C, C + + by Sungo

Related Article

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.