Click here to Skip to main content
15,030,781 members
Articles / Operating Systems / Windows
Posted 25 May 2006


78 bookmarked

C++ Development using eclipse IDE– Starters guide

Rate me:
Please Sign up or sign in to vote.
4.51/5 (28 votes)
25 May 20063 min read
C++ Development using eclipse IDE– Starters guide
Title:       C++ Development using eclipse IDE– Starters guide.
Author:      Boby Thomas P
Environment: Eclipse - Win / Linux
Keywords:    Eclipse, CDT
Level:       Intermediate
Description: This article will guide you to set up CDT plugin to eclipse for C++ development.
Section      C++
SubSection   General

C++ Development using eclipse IDE– Starters guide


I was a fulltime user of windows operating systems and Microsoft visual studio products for c/c++ application development. Couple of month's back I started using Linux (Ubuntu breezy). I searched for a good IDE for C++ developments in Linux and found eclipse and its plug in architecture very powerful. I decided to start using Eclipse in Ubuntu and everything worked very well. Then I decided to use the same IDE for windows as well, which will make myself more comfortable with eclipse environment. But I faced few problems while setting up a C++ development environment with eclipse and so I decided to document the same so that others also can get benefit from what I have found out.

Setting up Eclipse CDT C++ IDE


  1. Download and install latest java runtime environment. (You might be having one. If not install it). You can find it in
  2. Download and extract eclipse to a suitable directory. You can find this also in eclipse website.
  3. Launch eclipse (It will launch without any problems if you have Java runtime environment installed) and add the CDT link in help -> Software updates -> find and install.

<shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter"><formulas><f eqn="if lineDrawn pixelLineWidth 0"><f eqn="sum @0 1 0"><f eqn="sum 0 0 @1"><f eqn="prod @2 1 2"><f eqn="prod @3 21600 pixelWidth"><f eqn="prod @3 21600 pixelHeight"><f eqn="sum @0 0 1"><f eqn="prod @6 1 2"><f eqn="prod @7 21600 pixelWidth"><f eqn="sum @8 21600 0"><f eqn="prod @7 21600 pixelHeight"><f eqn="sum @10 21600 0"><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"><lock aspectratio="t" v:ext="edit"><shape id="_x0000_i1030" style="WIDTH: 453pt; HEIGHT: 225.75pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image001.png">Sample image

You will get a dialog where you can specify the eclipse CDT plug in path for installation.

<shape id="_x0000_i1031" style="WIDTH: 267pt; HEIGHT: 115.5pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image003.png">Sample image

Now eclipse will connect to the Internet location specified and install the required components for eclipse CDT. You need to be connected to Internet for this installation. Please read the document in the eclipse CDT location for offline installation.

  1. Now Launch File -> New -> Project and you will get a dialog like this where you can specify C++ project and continue with remaining stuffs.

<shape id="_x0000_i1025" style="WIDTH: 375pt; HEIGHT: 375pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image005.png">Sample image

  1. Looks very easy right. Create a new project as usual write a hello world program. And compile it. It wont compile because eclipse expect you to supply the make file required for compilation. Write a simple make file as given below and keep it in the same directory where your c++ source files are kept.

#Make file written by boby Thomas Pazheparampil
INCLUDES = -I ./include
CC = g++ -g -Wno-deprecated

all : cmain
cmain : cmain.o
            $(CC) cmain.o -o cmain 
cmain.o : cmain.cpp
            $(CC) $(CFLAGS) cmain.cpp 
clean :
            rm -f *.o
  1. Now compile again, you will get a message like this "error launching external scanner info generator /GCC -E -P -v -dD eclipse CDT". The reason for this error is, the GCC compiler required for compiling the source files are not present in the windows path location. You confirm this by typing "gcc --version" in command prompt. If you get a message saying command not found, you can be sure that GCC compiler is not available.

Additional tools required for CDT

For running CDT from eclipse, you need to have the following tools.

  • Make tools for make process.
  • GNU compiler collection (GCC) for compilations.
  • GDB for debugging.

You can download all these tools from You have to download and install build tools (make), compiler (GCC) and debugger (GDB). You can find all these tools in the location also. But I recommend the usage of mingw.

Once you have all the supporting tools available, change few settings in eclipse.

  • Select "Project->Properties->C/C++ Make Project->Binary Parser" and select Elf Parser and PE windows parser.

<shape id="_x0000_i1026" style="WIDTH: 422.25pt; HEIGHT: 442.5pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image007.png">Sample image

  • Select "Project->Properties->C/C++ Make Project" and set proper debugger you have installed.

<shape id="_x0000_i1027" style="WIDTH: 422.25pt; HEIGHT: 442.5pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image009.png">Sample image

  • Select "Run->Debug->Debugger" and select "GDB debugger" and locate the path to gdb debugger.

<shape id="_x0000_i1029" style="WIDTH: 453.75pt; HEIGHT: 402.75pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image011.png">Sample image

  • Select "Run->Create Make Target" and set a proper make command you need to execute for different make operations.

<shape id="_x0000_i1028" style="WIDTH: 210pt; HEIGHT: 261.75pt" type="#_x0000_t75"><imagedata src="file:///C:/DOKUME~1/Boby/LOKALE~1/Temp/msoclip1/01/clip_image013.png">Sample image

Now try debugging again. It should work fine. Wish you a happy coding with eclipse.


Eclipse is free software available in Windows as well as Linux. C++ applications developed in eclipse can be easily taken to any other platforms very easily. Also as a developer, if you are familiar with eclipse development environment, switching from Windows to Linux is no big deal.



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Boby Thomas P
Software Developer (Senior) DWS
Australia Australia

Comments and Discussions

QuestionDebuging C++ in Eclipse Pin
enkiarchilla13-Dec-15 15:34
Memberenkiarchilla13-Dec-15 15:34 
Questioneclipse c\c++ Pin
ho_khalaf26-Nov-12 6:37
Memberho_khalaf26-Nov-12 6:37 
QuestionHow to link .lib files to CDT Pin
Sriram Raghavan16-Nov-10 3:05
MemberSriram Raghavan16-Nov-10 3:05 
QuestionRe: How to link .lib files to CDT Pin
PKJenaX4-Apr-12 15:46
MemberPKJenaX4-Apr-12 15:46 
GeneralAn updated guide available Pin
dehlia23-Jun-10 16:35
Memberdehlia23-Jun-10 16:35 
Questioncan I build AST with gcc only able to compile on a different architecture? Pin
Danny Anafzahav7-Apr-10 1:23
MemberDanny Anafzahav7-Apr-10 1:23 
GeneralMy vote of 1 Pin
wuuhuu2-Dec-09 9:08
Memberwuuhuu2-Dec-09 9:08 
GeneralThis is soooooooo old... Pin
wuuhuu2-Dec-09 9:08
Memberwuuhuu2-Dec-09 9:08 
GeneralThanks a lot Pin
peretog7-May-09 14:50
Memberperetog7-May-09 14:50 
mibercicp19-Dec-08 17:44
Membermibercicp19-Dec-08 17:44 
anticafe22-Aug-09 17:29
Memberanticafe22-Aug-09 17:29 
Generalfurther building when I get a compiler-error Pin
piwi13319-Sep-08 1:09
Memberpiwi13319-Sep-08 1:09 
Questiona simple program on EMP [modified] Pin
sireeshakolluri8-Apr-08 23:41
Membersireeshakolluri8-Apr-08 23:41 
GeneralError trying to debug Pin
hallrd2-Oct-06 7:52
Memberhallrd2-Oct-06 7:52 
AnswerRe: Error trying to debug Pin
woleadetiba19-May-07 14:38
Memberwoleadetiba19-May-07 14:38 
GeneralRe: Error trying to debug Pin
jbperrin1-May-08 13:36
Memberjbperrin1-May-08 13:36 
General[Message Removed] Pin
nompel20-Sep-08 14:58
Membernompel20-Sep-08 14:58 
QuestionHow-to get C++ online help from Eclipse CDT Pin
phgddr28-Aug-06 4:26
Memberphgddr28-Aug-06 4:26 
QuestionFailed to make Pin
Michael knafo20-Jul-06 23:57
MemberMichael knafo20-Jul-06 23:57 
AnswerRe: Failed to make Pin
Boby Thomas P21-Jul-06 2:43
MemberBoby Thomas P21-Jul-06 2:43 
GeneralStep-by-step debugger Pin
ed welch5-Jun-06 8:46
Membered welch5-Jun-06 8:46 
QuestionMFC support? Pin
mr.scrag30-May-06 7:15
Membermr.scrag30-May-06 7:15 
QuestionEclipse Slow? Pin
RichardS29-May-06 22:23
MemberRichardS29-May-06 22:23 
AnswerRe: Eclipse Slow? Pin
rpwt30-May-06 8:48
Memberrpwt30-May-06 8:48 
AnswerRe: Eclipse Slow? Pin
ralphatcp13-Mar-07 23:28
Memberralphatcp13-Mar-07 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.