0% found this document useful (0 votes)
35 views

How To Setup C Compiler and Eclipse CDC

This document provides instructions for setting up a C/C++ development environment on Windows using MinGW, MinSYS, and Eclipse CDC. It describes downloading and installing MinGW and MinSYS to get a C/C++ compiler, setting environment variables to include their binaries, downloading and installing the latest JDK, downloading and installing Eclipse CDC, and creating a simple "Hello World" C++ project to test the setup.

Uploaded by

Daniel Mihalca
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

How To Setup C Compiler and Eclipse CDC

This document provides instructions for setting up a C/C++ development environment on Windows using MinGW, MinSYS, and Eclipse CDC. It describes downloading and installing MinGW and MinSYS to get a C/C++ compiler, setting environment variables to include their binaries, downloading and installing the latest JDK, downloading and installing Eclipse CDC, and creating a simple "Hello World" C++ project to test the setup.

Uploaded by

Daniel Mihalca
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Setting up a compiler and Eclipse CDC on Windows

Install MinGW and MinSYS Eclipse only provides the Integrated Development Environment (IDE) but it is missing the actual c++ compiler. Download MinGW from http://sourceforge.net/projects/mingw/ this installer contains: MinGW - - Minimalist GNU for Windows, a native Windows port of the GNU Compiler Collection (GCC) MinSYS - is a collection of GNU utilities such as bash, make, gawk and grep When the installer ask for the list of components to be installed make sure you include all the components (c++ compiler, mysys)

Setup Environment Variables After installing you have to set up PATH environment variable to make sure that MinGW and MinSYS executable are accessible.
Append to PATH
C:\MinGW\bin;C:\MinGW\msys\1.0\bin

Test if MinGMV and MinSYS is working propelly Open a new command prompt window and type: make --version Open a new command prompt window and type: g++ --version

Install Eclipse CDC (C/C++ Development Tooling)

Eclipse CDC provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform. Install latest JDK (Java Development Kit) Make sure JDK is installed on your machine. If you already have a JDK installed you should update to the latest version (especially important on 64bit machines due to some JVM (Java Visrtual Machine) bug in the earlier versions) Recommended version: Version 6 update 31
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download-1501634.html

Setup PATH Environmental variable


Usually done by the JDK installer, if not you have to add the JDK to the PATH.

Test if you have a working JVM


Open a new command prompt window and type: java -version

Download and unzip Eclipse CDC


CDT 8.0.2 for Eclipse Indigo - Eclipse package: Eclipse C/C++ IDE Indigo SR2. Download / unzip eclipse CDT from: http://www.eclipse.org/cdt/

Create your first C++ application


Start Eclipse, set the workspace directory to a directory where you have rights to create/modify files. This location will contain all the files for the created C++ projects.

Create a new C++ Project


File -> New -> C++ Project Set the ProjectType to Executables -> Hello World C++ Project Select MinGW GCC Toolchain

Build and Run the application

Right click on the project root -> Run as-> Local C/C++ Application Build and Run is accessible from the toolbar also.

You might also like