How To Install Eclipse for C/C++ Programming on Windows

1. Configuration

Step 1: Install MinGW GCC

1. Goto MinGW site at here ⇒ Installer ⇒ click on “mingw-get-setup” link to download the installer.
2. Run the downloaded installer.

1). Set the installation directory. (Try to use a directory name without spaces, e.g., “c:\MinGW“. Try Not to install under “Program Files” or “Desktop“. (Or just simply leave it the default position).
2). In MinGW Installation Manager, select “Installation” ⇒ “Update Catalogue”

⇒ Right click “mingw-developer-toolkit” and ”ming32-base”  and “msys-base”   in “Basic Setup” for “Mark for Installation” like this (Click the image to see it.)


3). Go to “Installation” menu and choose “Apply changes”.

3. Setup environment variable PATH to include “c:\MinGW\bin” where "c:\MinGW" is the MinGW installed directory that you have chosen in the previous step.

1). Go to here (Click the image to see it.)


2). Then, this (Click the image to see it.)


3). Then this (Click the image to see it.)


4). Finally. (Click the image to see it.)


4. Verify the GCC installation by listing the version of gcc by typing gcc -v in command line


Step 2: Install Eclipse for C/C++, see here


2. You first project

Step 0: Launch Eclipse

  1. Start Eclipse by running “eclipse.exe” in the Eclipse installed directory.
  2. Choose an appropriate directory for your workspace (i.e., where you would like to save your works).
  3. If the “welcome” screen shows up, close it by clicking the “close” button.

Step 1: Create a new C Project

For each C application, you need to create a project to keep all the source codes, object files, executable files, and relevant resources.

To create a new C project:

Choose “File” menu ⇒ “New” ⇒ Project… ⇒ C/C++ ⇒ C project. (Click the image to see it.)



The “C Project” dialog pops up.

1. In “Project name” field, enter “HelloWorld“.

2. In “Project Types” box, select “Executable” ⇒ “HelloWorld ANSI C Project”.

3. In “Toolchains” box, choose your compiler, “MinGW GCC” ⇒ Next.  (Click the image to see it.)


4. The “Basie Setting” dialog appears. Put whatever you want⇒ Finish.   (Click the image to see it.)


5. Build your project. Make sure your project is chosen and then  (Click the image to see it.)


6. Run your project  (Click the image to see it.)



Author: admin on October 14, 2014
Category: General

Last articles