Archive for December, 2010

Exploring CDT – Programmatically

December 29, 2010 Leave a comment

From last couple of  months I am working on eclipse CDT platform. It’s quite new to me since I haven’t worked on CDT before and I am familiar with only JDT.It’s good that you always learn new things.. J and that too based on my favorite platform eclipse.

CDT is nothing but the C/C++ developer platform built on top of eclipse.It provides lots of functionalities like project creation , managed build , managing toolchains etc.,To know more about CDT you can refer here.

We will see the basic flow how a cdt project is created and launched.

Once you  create a new C/C++ project  , you will create all your folders and as good practice you will keep all your source files in src/ folder and all the header files in inc/ folder.

You need to do some project settings which can be done here your project – > properties->C/C++ Build ->Settings. Here you will set all the tool chains settings and build artifact settings. In  project – > properties->C/C++ General->Paths and Symbols, you will set all your macros and libraries.

By default CDT has two configurations namely “Debug” and “Release”. At any point of time only one config will be active.After all this done you will launch C/C++ application. All the source and header files are being compiled using the tool chain you have set and they will be converted into object files and at last they are bundled as an exe and eclipse will launch that exe when you choose Launch C/C++ application in the Navigator/Project explorer context menu.

You can see the created exe in navigator view under the folder which is named as per the configuration used.

In further posts I am going to discuss how we can build a CDT project , set the macros , libs etc., programmatically.I will also share my explorations on eclipse cdt 😉

Categories: Eclipse CDT Tags: , ,