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
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

There WILL be a JavaOne this year
JavaOne will happen in 2010, as a co-located event with Oracle's OpenWorld, on Sept. 19-23 in San Francisco.
01/27/2010 01:02 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

Up and Running With CDT




October 24, 2007 — 
In case you hadn't noticed, Eclipse is good at more than just Java. The CDT is Eclipse's C/C++ Development Tooling project, and it’s “an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers,” according to the CDT project's wiki.

Recently I had occasion to work on a C++ application, and made my way through the installation of the CDT on Windows and Mac. In this week's article, I describe how I got up and running on both platforms.

The download portion of the installation was like any other Eclipse installation. I went to the eclipse.org Web site, hit the download page and selected the Eclipse IDE for C/C++ Developers download. Like all Eclipse downloads, the only task required from me once the download completed was to unzip the file into a directory of my choice. After that task, you’d think that all I needed to do was to double-click on the Eclipse application icon to be up and running. Wrong! Here’s a case of the importance of reading the fine print. Just below the Eclipse IDE for C/C++ Developers download link is the line “An IDE for C/C++ developers. Find out more...”, as shown in Figure 1.

Don't forget this link, because there is more. Turns out that CDT doesn’t contain a compiler or debugger, and if your system also lacks one, like mine, you’ll need to download and install one. This wasn’t a difficult task on Windows. You’ll find all you need by looking in the "Before you begin" section of the C/C++ Development User Guide in the Help for more information, or by clicking “here” in the line (Click here for more information about C/C++ compilers and tools) on the More Information page, as shown in Figure 2.

On Windows there are several commercially available C/C++ compilers, such as Microsoft Visual C++ and Intel? C++ Compiler. If you don't want those, you can consider MinGW or Cygwin.

As the documentation states, MinGW is a collection of “freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.” This is the one I selected. Other than running the installation, the only thing I had to do was to get the MinGW bin directory on my path.

The test for this is easy. Open a terminal window and type gcc. If you get a message something to the effect of “no input files,” you know you’re ready to start up Eclipse. It will detect the presence of MinGW, and you’re ready to create your first C++ project.

On the Mac I had the same problem: I needed a C/C++ compiler. After searching around for a bit, I stumbled onto a solution.

At http://developer.apple.com/tools/xcode/ is Xcode, Apple's integrated development environment for Mac OS X. With Xcode version 2.0 and later, there’s a new GCC compiler—just what I needed. After downloading the Xcode dmg file and clicking it, I then selected the XcodeTools.mpkg, as shown in Figure 3, to install the tools.

To check the installation, open a terminal window and type gcc. The result should be i686-apple-darwin8-gcc-4.0.1: no input files, as shown in Figure 4.

Next, I started the CDT version of Eclipse, and I was ready to develop, as shown in Figure 5.

Next time, I’ll tell you about my CDT efforts.


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

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading