Sunday, 31 July 2011

It somehow doesn't surprise me that my first blog posting is about c/c++ development. No matter how many languages I have tried in my career of software development, I can never quite match the sense of nostalgia I get when I start a C/C++ project.

I still remember those many late nights debugging memory corruptions and tracing through cryptic and horrendous code (often my own) trying to understand the spaghetti of pointers, templates and operator overloads. I have yet to find a language as ugly as C++, yet having the ability/affliction of being able to be productive in writing quality C/C++ code comes with a sense of pride and accomplishment that in my experience has never been rivaled by any other programming language. Of course, effective tooling has a lot to do with that.

We have come a long way in terms of the quality of tooling that is now available for C/C++, not only the features that help with coding debugging and testing but also for collaboration with other developers on the team. The ability to share and cross reference information, whether its code, files, plans, change sets, work items, defects is essential for productivity and quality and is as important to C/C++ developers as much, and perhaps even more, as other developers using different technologies.

In many of the complex IT solutions that are being built today, C/C++ developers also need to collaborate with other developers and team members (no matter what technology and role) in order to plan and coordinate the complexity of a multi-component system so as to agree on interfaces and such.

To make a long story short, C/C++ developers need to be able to participate in this ecosystem and the best platform to do this is Jazz so my blog today is about how to start with Rational Team Concert (RTC and the C/C++ Development Tooling.

I will show how to integrate the MinGW GCC toolchain into Rational Team Concert on Windows. In a follow up blog posting I will show how to create an OSLC CM consumer in C/C++ that lists project areas using libcurl and libxml2.

3. You will need to download CDR but this is done in the instructions below as you will need to install RTC firstWhat to configure and Install:

1. Install, at a minimum, RTC and the Jazz Team Server (I will use it in subsequent posts).NOTE: There is extensive information on jazz.net and in the CLM 3.0.1 information center on how to do this so I won't cover it here.2. Unzip the mingw-get package into C:\MinGW (of D:,E:, whatever).NOTE: You can put it anywhere you want but the important thing is NOT TO USE SPACES IN THE PATH

3. Set the MINGW_HOME environmental variable on Windows to this directory. Put MINGW_HOME\bin in the system PATH.

NOTE: If you are on Windows 7 or Vista, you have not turned off user access control (UAC) and you installed RTC into "Program Files", you must install as administrator by right clicking on the RTC executable and selecting "Run as administrator"

10. Search for and install the Eclipse C/C++ Development Tools

11. Restart RTC

12. Go to Window->Preferences->C/C++->New CDR Project Wizard and make sure you can see the MinGW toolchain and ensure that it is the preferred for all wizards.

14. Switch to the C/++ perspective and create a test project. File->New->C Test Project. Select the Hello World ANSI C Project. Click through to Finish.

15. Now you should be able Build from the Project menu and Run and Debug from the Run Menu

Pretty Simple!! Note that in the scenario above we allow RTC to manage our build environment. For some people (like myself) prefer to manage the Makefile and this is also possible in RTC and I will perhaps cover it in a future blog along with automated Makefile builds with Jazz.

Disclaimers

The postings on this site are my own and don't necessarily represent IBM's position, strategies or opinions.

Anyone is free to use, copy, distribute, modify or sell the source code and other materials directly linked from boriskuschel.com and isprovided "as is" without warranties.I am not responsible for any harm or damage caused to your computer, software or anything else caused by the material.