Eclipse + CDT + mingw security expert

Source: Internet
Author: User

I have put all the necessary cases on the top of the attached education website, which can be taken directly to the http://www2.nknush.kh.edu.tw/ComputerEducation/ "Eclipse + CDT + mingw "

In addition to developing Java, eclipse also supports many other languages. Of course C/C ++ will not be missed, now let's take a look at how to use eclipse to develop C/C ++ programs. Use eclipse to develop the main steps of C/C ++:

1. Because eclipse is developed in Java, you need to use JRE. If you have installed jre before, you can skip this step. 2. There is no problem with installing eclipse. You must renew it. Otherwise, how can you use it? 3. if you don't mind using the English interface, you can skip this step. CDT is a plug-in that enables eclipse to develop C/C ++ programs. This is our main character and must be! 5. Installing mingw is required to allow your computer to have GCC, G ++ processors. How can you upgrade it? 6. security C ++ formatter CDT does not have a formatting tool for program editing. You can use this tool if you do not have this requirement.

You can perform the following steps:

I. JRE 5.0's anchor ‧ lower priority: http://java.sun.com/j2se/1.5.0/download.jsp or to the high school education website, choose JRE 5.0 Update 5, click "accept" and select "Windows offline installation, multi-language" ‧ "Windows platform. 2. Install eclipse first into the eclipse official website http://eclipse.org left find download version 3.1 already release, but there is no Chinese Language kit, if you have a deep fear of English, first use 3.0.x, under the http://eclipse.org or to the high school information education network under the eclipse 3.0.1 platform. After the renewal, you can resolve the issue to the path you want to place, and pull the Jie.

3. Eclipse Chinese kit on the same way in the http://eclipse.org can find the Chinese pack-eclipse-sdk-3.0.x-win32.zip or to the high school information education network under the eclipse 3.01 Chinese Language package will NLpack-eclipse-SDK-3.0.x-win32.zip after the release of the plug-ins and features two copy the contents to the same category of Eclipse. Then you can see the Chinese interface. If you cannot see it or a small part of it is not completely Chinese, in your eclipse release, right-click to select the content and add-clean to the "project" and then click "OK !! After normal operation, this-clean can be removed.

4. After CDT is installed on the terminal, you need to compile CDT to enable eclipse to develop C/C ++ programs. First, perform the following CDT, under the website http://www.eclipse.org/cdt/find the org.eclipse.cdt-2.1.1-win32.x86.zip or to the high school information education network under the CDT 2.1.1 if you installed eclipse is 3.0.x version, you must install CDT 2.1.1 latest version if installed eclipse is version 3.1, you must have installed the CDT version 3.0.

Security: The entire features and plugins resources after the solution are added to the eclipse security information and you can re-open eclipse. When a new case is created, we can see that C and C ++ have been selected, which indicates that the security has been successful. If you cannot see it, add the-clean rows in the same way.

5. As of now, Alibaba Cloud Security mingw has installed CDT on Eclipse, however, you still need a "compiler" to compile your program. Therefore, you need to download the gnu c, C ++ compiler that can be used on Windows, which of the following statements is called mingw. Under the website site: http://www.mingw.org/download.shtml found in the lower part of the MinGW-3.1.0-1.exe or to the high school information education network under the MinGW-3.1.0-1 PS: Security Program Selection C slot, then click "Next. The path is as follows-> C: "mingw.

Add the following settings to the Environment Change: Path: C: "mingw" bin; for Windows users, choose "my computer"> "content"> "import"> "environment changes"> "System Changes"> "path" adding C: "mingw" bin.

Because the name of the plugin used in eclipse is make.exe, but the make extension name of the plugin configured after mingw is installed is a mingw32-make.exe, you can change the mingw32-make just make it! In order to enable CDT to use mingw for further debugging, we want to go back to eclipse to set up the parser window-> Settings-> C/C ++-> make-> New make project-> New builder find binary parser cancelling elf parser and selecting PE windows parser

6. Security C ++ formatter is a tool used to typeset C/C ++ programs, for the modified program that has already been modified, it is a life-saving thing. Let the Program program immediately return to the "elegant" shopping festival. Because the CDT plugin does not have any internal formatter, other tools are used. Here we want to use artistic style. Astyle web site under the http://sourceforge.net/projects/astyle to buy astyle_1.15.3_win32.zip or to the high school education network under the elastic astyle_1.15.3_win32.zip solution after the local location. In eclipse, we must use it with "external tools.

Set the following parameters for external tools:

 

Select "program" and click "new". Name: formatter. Location: Press "program verification program system... "Here is the job description for finding the location of astyle.exe. Example: $ {workspace_loc:/$ {project_name}. Reference: -- style = Kr $ {resource_name} After selecting "", all instances have been installed.

Next, compile a small program to open eclipse-> Create a new project-> C/C ++-> managed make C ++ project point "to complete" test in the release case top right Click Upload-> Add-> source file to get a source file named upload, remember to add a nickname. CPP

Write this program into Alibaba

# Include<Iostream>Using NamespaceSTD;IntMain () {cout <"Hello world! "<Endl;Return0 ;}

In this case, if you want to typeset the program, click "publish"-> external tools-> select formatter. If you have selected a formatter, there will be no reverse response immediately, at this time, as long as the dialog box is closed, the "yes" dialog box appears to take effect.

When the database is saved, it will automatically adjust its dynamic vertex "dynamic row"-> ignore row... -> Local C/C ++ application, you can see the success line on the console !!

Reference: [tutorial] Development of C and C ++ by sungo using eclipse in window + GCC + CDT

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.