C Programming Tutorials and advice
CProgrammingTrends News Archives About Us Feedback


Recent Articles

Using Immediate Window to Work with Values
[2006-08-30] This article is an excerpt from the book: Murach's ASP.NET 2.0 Web Programming with C# 2005.

C++ - No Fears And Great Books
This is a quick look at a couple of stories on C++, namely why programmers should not feel The Fear...

New NetBeans Pack Supports C/C++
Developers who work in C or C++ can use the NetBeans integrated developer environment to build applications on Windows, Linux, and Solaris.

Computer Programming As Art
This isn't about programming the visuals for the next great Pixar release, or even creating ASCII art...


09.14.06


Revisiting C/C++ On Eclipse


By David A. Utter

The tutorial from IBM's developerWorks on using the C/C++ Development Toolkit (CDT) for Eclipse received a refresh over the summer, and it merits a look from those who may have missed it since then.

In the writeup on IBM's website about Eclipse and C/C++ development, Warsaw-based writer Pawel Leszek talked about making Eclipse the framework for creating applications in C.

Leszek specifically looks at equipping Eclipse with a set of plug-ins to make the environment into the nicely-equipped CDT a developer will need. He listed them and a summary of each one:

•  Primary CDT plug-in is the "framework" CDT plug-in.
•  CDT Feature Eclipse is the CDT Feature Component.
•  CDT Core provides Core Model, CDOM, and Core Components.
•  CDT UI is the Core UI, views, editors, and wizards.
•  CDT Launch provides the launch mechanism for external tools such as the compiler and debugger.
•  CDT Debug Core provides debugging functions.
•  CDT Debug UI provides the user interface for the CDT debugging editors, views, and wizards.
•  CDT Debug MI is the application connector for MI-compatible debuggers.

Getting the CDT up and running varies depending on the operating system of choice. Eclipse and Java SDKs would need to be installed and running properly. Linux users have GCC on their systems, so they are all set. Windows users will need to grab either Cygwin or the MinGW toolkit first.

Wanna wallet stuffed with $10,000?
SalesGenius™.

Once the CDT components are installed, three new options will be available for projects: C ("Standard C Make Project"), C++ ("Standard C++ Make Project"), and "Convert to C or C++ Projects". Eclipse can import existing source code through use of the File-> Import -> File System command.

Leszek noted how the CDT IDE recognizes C/C++ syntax. Eclipse will do syntax highlighting, code colorizing, and code formatting. The Outline window shows procedures, variables, declarations, and functions in the source code.

CDT also has code completion. The developer can update the code templates the assist function draws from, or add new ones as desired. Also, CDT maintains a local code history, so even if a developer is not using version control this will show local changes made in the source.

To build projects, CDT depends on GCC, GDB, and make. Leszek warned that "source code packages use the autoconf script for checking the build environment, so you need to run the configure command, which creates the "Makefile" before compilation."

The Run menu in Eclipse provides the options needed to run and debug the application as needed. Options for running a project can be set for Run, such as profiles to run under, arguments to pass to the application, or environment variables.

Under Debug view, CDT adds functions for debugging C/C++ code. The developer can set breakpoints or watchpoints, and trace variables and registers according to Leszek. Overall there are plenty of features to make CDT an option to consider for those who want to try Eclipse out for C/C++ work.

About the Author:
David Utter is a staff writer for WebProNews covering technology and business.

About CProgrammingTrends
A collection of articles and tutorials designed to help C and C variant programmers in their programming work. C Programming Tutorials and advice

CProgrammingTrends is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagmentNews.com


-- CProgrammingTrends is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal


archives | advertising info | news headlines | free newsletters | comments/feedback | submit article




CProgrammingTrends Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact