Build a C ++ environment for eclipse development in Windows (below)

Source: Internet
Author: User

First, set our compiler to GCC.

Window-> preferences-> C/C ++-> New CDT Project Wizard

Select mingw GCC and click the area circled in the red box below.

 

Create a C ++ project. The Compiler points to mingw GCC by default. Create an empty project and finished it directly.

Because it is an empty project, you need to create a main. cpp file. Of course, it can also be called shit. cpp. Copy the C ++ test file we just wrote into it.

Click the hammer icon and compile it. You do not need to write makefile by yourself. This is so simple.

Compiled directory structure

Most importantly, add the path to the running environment (run environment). Otherwise, the console will not output any information (the command line method will not be affected ).

PS: When you create a C Project, you can output it on the console without configuring this configuration.

Run-> RUN configuration-> select Create Project-> Environment

Manually adjust the pathvariable value to the path of the make.exe file, that is, the value added to the system path.

Click "run" without compiling (the same as the Java icon). If no source file is compiled, the system automatically compiles the file without modifying the source file. The following prompt is displayed.

OK, done!

Good luck, have fun.

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.