News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 2/1/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Visual Studio 2010 Release Candidate Available Today
A Visual Studio 2010 release candidate is available on MSDN.
02/09/2010 09:45 AM EST

Is Microsoft eyeing Office subscription pricing?
Microsoft may be preparing to offer a new Office pricing option called "union," which charges the same for cloud as on-premises.
02/01/2010 09:38 AM EST

Facebook rewrites PHP runtime
Facebook is about to open source its own PHP runtime, written from scratch for speed.
01/30/2010 08:53 PM EST

 

Events calendar tab
2/9/2010 to 2/13/2010
San Francisco
IDG World Expo

2/10/2010 to 2/12/2010
San Francisco
BZ Media

2/17/2010 to 2/25/2010
Atlanta
Python Software Foundation

2/19/2010 to 2/20/2010
Los Angeles
SCALE

2/21/2010 to 2/24/2010
Las Vegas
IBM


 
Most Read Latest News Blog Resources

Tips: Taking C++ on its Maiden Voyage




November 7, 2007 — 
Last time I explained how to get up and running with the CDT, the C/C++ Development Tooling project. I covered how to install the tools along with a gcc compiler, a required component for building your C++ applications. This week, I'll look at some of the CDT's interesting features.

Starting Eclipse with the CDT is no different than with any other plugin. If opening for the first time, Eclipse will show you the welcome screen and put you into the C/C++ perspective by default, as shown in Figure 1.

If you're used to the Java perspective, you'll notice a difference in the Make Targets View, which enables you to select the make targets you want to build in your workspace. Another difference is the Project Explorer view, which provides a hierarchical view of the resources in the Workbench. From this view, you create your C/C++ project and files for editing or select resources for operations such as exporting.

Starting with the Project Explorer and the corresponding File->New menu, you're presented with the list of options as shown in Figure 2.

As always, you can create general projects, folders and files. As the figure shows, you can also create the corresponding items related to C/C++ development such as header, source and class files. Selecting the C++ option and hitting the Next button brings the wizard to a page where you can create C++ projects containing entities such as executables, shared libraries, static libraries and makefiles, as shown in Figure 3.

Here is the first place that you can also check to see if your installation of a gcc compiler was successful. In my case, I installed one for the Mac OS. If you installed more than one compiler, you can select which one your project should use from this page in the wizard.

From this page, you can also select a template to start your project. I selected the Hello World C++ Project template. Hitting the Next button brings you to a page where you enter information specific to the template you selected, as shown in Figure 4.

Hitting the Next button again brings you to a page where you can select the different configurations you're interested in, such as debug and release, as shown in Figure 5.

Finally, selecting the Finish button produces your project as shown in Figure 6, complete with binaries, includes, src and debug files.

You can do more implementation if you need to, but the application is now ready to run. Select the project and the Run button, and you'll be asked if you want to run your project as a Local C/C++ application.

Next, you're prompted to select which debugger your project uses, as shown in Figure 7, and then it runs.

The corresponding menu entries for building, cleaning and making targets are available under Eclipse's Project menu, as with the Java Tooling. In addition, the search functionality has been extended to include C/C++ specific data, as shown in Figure 8.

Now comes the really cool part. The debugger works pretty much the same as it did with the Java Tooling, as shown in Figure 9.

You set breakpoints the same way. You start the debug session the same way. There is a Debug perspective that looks much the same. And you step and navigate much the same as in the Java Tooling. Works for me! When exploring and learning a new tool, I find it easiest when access to features is consistent from one tool to another. I hate having to remember different ways to do the same things!

If you're experienced with Java Tooling, the move to CDT should be just a quick little jump.

WAS THIS TIP HELPFUL?


Share this link: http://www.sdtimes.com/link/31282
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading