Eclipse + cdt + minGW (C/C ++ compilation), cdtmingw

Source: Internet
Author: User

Eclipse + cdt + minGW (C/C ++ compilation), cdtmingw

1. Install Eclipse CDT

Method 1:

If Eclipse has been installed, you can choose Help> Install New Software to Install the CDT plug-in.

Click ADD.

Name: CDT

Location: select the CDN zip file directory.

Select All installation

   

  

Method 2:

Eclipse IDE for C/C ++ Developers

(Cdt: The http://download.eclipse.org/tools/cdt/releases/galileo)

1. Find the directory to which the cdt is extracted

Features folder

Plugins folder

Copy the files to features and plugins under eclipse respectively.

2. org. eclipse. cdt. core. win32_5.1.0.201002161416.jar under eclipse plugins
Decompress It To The org. eclipse. cdt. core. win32_5.1.0.201002161416 directory,

Delete the original jar package. (This step depends on whether you have any problems with the C ++ project)

2. Install MinGW

Run the installer,

On the SeLect Components page,

SelectC Compiler,C ++ Compiler,MSYS Basic SystemAndMinGW Developer Toolkit.

3. Configure MinGW

Right-click "my computer", click "properties", and click "Advanced System settings" on the left ". In the "System Properties" dialog box, select the "advanced" page at the top and click "environment variables ".

Add a Path similar to the following on the top of the Path variableC: \ MinGW \ bin;

  

Open the C/C ++ column under Eclipse-Window-Preference-Environment

Create a PATH to add MinGW/bin;

    

4. Verify MinGW

In "start"-"run"-"cmd"

  Enter gcc-v

G ++-v

Gdb-v

  

5. Compile the C/C ++ Project

1. Eclipse-File-new-C project (or C ++ Project)

 

  

2. Right-click a Project and choose Build Project.

Multiple debugdirectories will be viewed (ensure that the directory contains the. exe file)

If you do not perform this operation, the following problems may occur:

3. Right-click the project and choose "Run as-1 Local C/C ++ Application ".

   

* If no results are output in the Console, there is a solution:

Project-right-click-Run as-Run configuration-Enviroment

Select...-Select PATHEXT

    

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.