Build up C/C++ environment on eclipse using CDT + cygwin

More and more people want to use open source IDE instead of Visual Studio to writing C/C++ because it’s clean and free. Here, we introduce eclipse to writing C/C++ program. Eclipse is an excellent IDE for Java programming. Due to its open source platform, we may use it for C/C++ programming as well. CDT(C/C++ Development Tool) is a plugin that allows eclipse to support C/C++. Cygwin is a Linux-like environment for Windows and it allows you to use gcc/g++ compiler. There’re just several steps to build up your own eclipse. Now, let’s go.

Step 1:
Download Cygwin setup here: http://www.cygwin.com/setup.exe
Install it according to the following guide:

01

02

Recommend to choose a short path and a simple name of the root directory
03

Choose a location to download the installation file(not necessary be a subfolder of root directory)
04

05

Choose a mirror site you like. You may view the mirror site list here: http://cygwin.com/mirrors.html
06

Expand Devel and select these components (by clicking skip label):
gcc-core: C compiler
gcc-g++: C++ compiler
gdb: The GNU Debugger
make: The GNU version of the make utility
07
Note: When you choose these components, Cygwin will automatically choose some other dependence for you. Just keep them.

Then it will download these packages and install them. When it completes, click Finish.

Step 2:
Add bin folder in the root directory of Cygwin to the environment variables named path. Either user variable or system variable is fine. In the above example, you should use E:\cygwin\bin.

Step 3:
If you download Eclipse IDE for C/C++ Developers, you may skip Step 3 and directly use it.
Download CDT here: http://www.eclipse.org/cdt/downloads.php
Make sure you select the suitable version for your eclipse.
Installing CDT may differ from its version. Here we use eclipse 3.4.2+CDT 5.0.2.
Unzip CDT zip file into a folder and fire up eclipse.
Click Help>Software Updates and choose Available Software.
Click Add site>Local and select the location of the CDT folder.
08

You will see the CDT is added to the Available Software list. Choose it and click Install.
09

Wait until it completes installation and enjoy it after restarting eclipse.

  • Share/Bookmark
This entry was posted in Programming Technology. Bookmark the permalink.

11 Responses to Build up C/C++ environment on eclipse using CDT + cygwin

  1. Bert says:

    In Step 2 what you have to do is to go to control panel-> system ->advance->environment variable

    and add a variable named ‘path’ and set E:\cygwin\bin (for example) to its value

  2. ANNET says:

    thanks

  3. Pingback: Basic Knowledge of Cygwin « Genius-Field

  4. Ogbzytcw says:

    i think your’s board nice dy,

  5. Bffzgqhm says:

    gorgeous your’s blog cool du,

  6. Karl Dou says:

    This an Good post, I will be sure to bookmark this post in my Reddit account. Have a great day.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">