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.
Download Cygwin setup here: http://www.cygwin.com/setup.exe
Install it according to the following guide:
Choose a mirror site you like. You may view the mirror site list here: http://cygwin.com/mirrors.html
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
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.
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.
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.
Wait until it completes installation and enjoy it after restarting eclipse.