Jan 22, 2013

Tutorial: Installing Eclipse IDE for C/C++ Developers on Windows

Here is a summary of the most important steps:
  1. Download and install a JDK version 8 (Java Development Kit) 
  2. Download Eclipse IDE for C/C++ Developers from http://www.eclipse.org/downloads/ (same bit version as for the JRE, i.e. 32 or 64 bit) and unzip e.g. to C:\dev\eclipse
  3. Download and install a C/C++ compiler (you will need gcc) for Windows, 

    • add the bin directory (e.g. C:\MinGW\bin) to the PATH variable, as before in 1.
    • Check on the command line: gcc
    • You should get: gcc: fatal error: no input files. compilation terminated. (this means gcc is found!!!)
  1. Start Eclipse with eclipse.exe. Then:
    • File > New > C Project
    • Enter a project name of your choice e.g. "helloworld"
    • Select project type "Hello World ANSI C Project" and toolchain "MinGW GCC"
    • Edit the source file:
    #include <stdio.h>
    
    int main(void) {
     printf("C/C++ on Eclipse...\n");
     return 0;
    }
    

  1. Initially build the project: either press Ctrl+B or click the "Hammer" button or right click the project and click "Build Project"
  2. Click the "Run" button. That's it!

No comments:

Post a Comment