Small white use Eclipse+cdt+mingw to build C + + development environment

Source: Internet
Author: User

    1. Installing the JDK, installing eclipse

2. Open eclipse to find "Eclipse Marketplace" under "Help"

3. Select the appropriate C plug-in:

Because it is installed, the installed is displayed, if you have not installed click Install before, follow the default action to complete the installation

4. Switch to C + + mode

Click on the C + + icon in the upper right corner for switching

Do you think you can write a program now? Too Young Too simple!

Also configure environment variables

5. Download min GW

I downloaded a lot of mingw, a lot of it is useless, I have been able to use my normal min GW upload to the Baidu Cloud

Link: http://pan.baidu.com/s/1eR6aYZo Password: fp6h

Download and Unzip

/* Current network disk or other file upload, often there is a limit on the number of files,

It's a good choice to put them in the same folder and add them to the package.

To say a little more, zip compressed file than RAR compression rate is high, the compression rate is higher. 7V, but not very common */

6. Setting Environment variables/ * Setting environment variables is the basic skill that will be used in many places, be sure to! */

Right-click "This PC" (My Computer) and select "Properties"

In the top left, click Advanced System Settings

Click on "Environment variables"

Select the path variable and click the Edit button

Now swing a pen, find the Unpacked MinGW folder, open the Bin folder, copy the current address

Back to the environment variable interface:

Click New, paste the address you just copied, then click OK

So if the environment variable is built, we can write programs to eclipse.

New Project

Fill in the project name, we can see Toolchains is our MinGW GCC, if not displayed, restart Eclipse, no toolchains, is not able to develop the project.

Right-click the project name and add File

If the Add header file suffix name is. h, if the source file is added, the suffix is. C. It's a cliché.

After you write the program, press CTRL+B to build project, and then it should be possible to run it by clicking Run, but this is what happens.

It turns out that eclipse does not automatically generate a binary that can execute after each compilation, so if you want to run a file that has been confirmed to be compiled correctly, you need to reset

Right-click the project name, and select Run Configuration

, select the Enable Auto Build

Click Apply

Now Ctrl+b Compile the program, click Run to execute the file successfully

If you have any questions, you can email [email protected]

Small white use Eclipse+cdt+mingw to build C + + development environment

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.