C language: Prepare the C language development environment for Windows + EclipseCDT.

Source: Internet
Author: User

C language: Prepare the C language development environment for Windows + EclipseCDT.

I have written an article about how to build a C Language Development Environment on the Windows platform, this article discusses how to use dev c ++, EclipseCDT, VisualStudio, Sublime Test, Clion, and other IDE/editors to build a C language development environment in Windows. However, this is just an introduction to the C language development environment, there are no detailed steps and procedures for the selection of each development environment;

This time, we will use the C language final course design document to introduce the timing of C language development with Eclipse, and gradually demonstrate how to use Eclipse to install and output your first C language Hello World;

You are welcome to discuss and share with each other;

 

Directory:

1. Download and decompress Eclipse

Ii. Official download of the JAVA Development Environment package (JDK)

Iii. JAVA environment testing

4. Open Eclipse to create a project

5. Build the GCC compiling environment using MinGW

6. Test the GCC Environment

7. Hello World!

Behind the scenes (show yourself at the end =, =)

 

1. Download and decompress Eclipse

Eclipse was developed by JAVA. At first, the product users were positioned on JAVA engineers, but the official website was not satisfied with this. To develop a freely definable IDE that can expand and accommodate various development environments, so there is a story about using Eclipse to write PHP and C language;

Click Eclipse IDE for C/C ++ Developers as shown in the arrow at the official Eclipse download URL, choose whether to download 32bit or 64bit based on your operating system processor configuration (32bit computers can only install 32bit, 64bit computers can ). To view the processor configuration of your computer, right-click my computer and choose Properties> View basic information about the computer> system type;

Compile (we recommend that you store 32bit Files in C: \ Program Files (x86), and 64bit Files in C: \ Program Files. I personally think that it is really good to store large-sized C Files, if you do not imagine a new environment, simply format the drive C when you reinstall the system, and the software is slowly re-downloaded );

If you follow this blog, double-click eclipse.exe:

Because Eclipse is developed by JAVA itself, as said, a JAVA Runtime Environment (JRE) or JAVA Development Environment package (JDK) must already exist on the computer to run Eclipse, so you have to install JRE or JDK before you can -- Mo panic, which means that the second step is successful;

 

Ii. Official download of the JAVA Development Environment package (JDK)

After the official JDK download URL is opened, click the arrow to download it;

On the displayed page, select "Accept License Agreement" (subject to the Product License) and select one of the two Windwows 32bit or 64bit indicated by the arrow, the 32bit and 63bit principles mentioned above also apply here;

After the download, install JDK. The installation process goes through the default next step;

 

Iii. JAVA environment testing

Open a command prompt in Windows (shortcut: Windows + F open the Run window and Enter cmd), as shown in;

Press enter. Enter java-version in the command prompt terminal and press Enter. If "JAVA is not an internal or external command, or a program that can be run" is displayed, the installation fails, multiple installation times =, =;

Enter java-version. If java version information is listed, the JAVA environment is successfully set up (mosaic =, = );

 

4. Open Eclipse to create a project

JAVA environment verification is successful (in fact, you can skip step 3. If Eclipse is installed successfully, it can be opened correctly), open Eclipse, and come to the Eclipse world

In the dialog box below, select the workspace (which can be placed on another disk). For convenience, select "Use this... ". You will not be asked about the workspace when it is enabled later (you can set a new workspace after entering it ):

Select a work area and go to the main interface. Click the arrow in the upper-left corner to create a C Project;

MinGW is not available by default (the C language environment can be compiled in Windows, and GCC support is provided). It seems that there is another step-install MinGW;

 

5. Build the GCC compiling environment using MinGW

As mentioned in the opening section, we have previously focused on setting up the GCC environment in Windows in the "C Language" and setting up the C language development environment on the Windows platform;

Go to the MinGW official website and click the download interface as shown in the arrow to download it;

The downloaded online boot installer is less than kb and MinGW must be installed online.

To ensure network connection, double-click the installer and click Next To Go To The Installation Management page, as shown in.

As we only need to compile the C language environment here, right-click in the first step and select the four indicated by the arrow (if the options here are not displayed, make sure that you click Basic Setup in the left-side menu bar or search All Packages in the left-side menu bar one by one based on the name, as shown in ). Click Installation-> Apply Changes;

Menu: This installation takes a long time. Prepare for the installation for more than half an hour =, =;

 

6. Test the GCC Environment

And then the mosaic time =, =. This step can be skipped in the same way as step 3.

In step 3, we have introduced the command prompt line to enter gcc. If the gcc: fatal error or other words appear, it indicates that gcc has been installed, but the gcc parameter is not provided, and the syntax is incorrect;

If gcc is not an internal or external command, =, =;

 

7. Hello World!

After extracting Eclipse, configuring the JDK environment, and configuring the GCC environment, we finally reached the exciting moment of Hello World (self-abuse ing ..);

Follow Step 4 to create a C Project, and MinGW will be available at this time. Select a tolerable project name and click Run as indicated by the arrow;

Wait, Lanunch failed =, = (and this is just a running problem that I encountered, and I don't know what problems everyone here can encounter =, = ), I entered this article to Baidu, which seems to look like a variety of high figures, but I didn't understand it;

In an unintentional step, click Build All, and run it again. The output is successful (@  ̄ @);

As for the principle, you need to go into depth;

The running result is displayed in the Console;

 

The result of writing a C-language blog in the early morning is that every section of this article ends with semicolons =, =;

 

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.