Visual C++ Integration and the CLI

Clearcase integrates with Microsoft Visual C++ (VC++). However is supports only one version of Visual C++ at a time. It accomplishes this integration by adhering to the Microsoft Common Source Code Control (SCC) specification. Icons in VC++ get customized with Clearcase. New context menus items are added for files. There is a new source control toolbar in the IDE (Integrated Development Environment). And there is a new tab in the output window called "Source Control".

A Clearcase view can be assigned to a drive letter like a network drive. There is a "share from Clearcase" option which allows links from one VOB to another VOB. You should not allow Clearcase to auto merge any "resource.h" file from VC++. Clearcase cannot correctly detect some conflicts with this file. When adding files to Clearcase, you must check out the parent directory first.

There are a number of files that you should not add to Clearcase. In general the files that should not be added are those that are generated by the IDE. These files can have extensions such as .aps, .bsc, .clw, .dll, .exe, .exp, .lib, .ncb, .obj, .opt, .pch, .pdb, .res, and .tlb. The full list is extensive. But following the rule of not checking in generated files is usually sufficient.

Clearcase also integrates with other Microsoft tools such as Visual Basic. However I work exclusively with Visual C++ so I will not go into this integration.

The cleartool command starts the command line interface tool. It has an extensive set of commands. It operates in two modes: single command mode and interactive prompt mode. With the single command mode, you type "clearcase " to run every command. With the interactive prompt mode, you issue the cleartool command which causes the "cleartool>" prompt to be displayed. You can then issue sub commands without typing cleartool each time. In this mode you can end a line with a caret (^) to act as a continuation character. You should also quota any arguments that include a space character.

Commands as well as arguments have abbreviations. Here are some additional properties of the single command mode of the CLI:
  • The command is first processed by the command shell
  • The command shell expands environment variables
  • The C run time library interprets quotes to delimit arguments
  • The Clearcase commands expand special characters such as the asterisk (*)

Clearcase commands return 0 for success, and a non-zero for errors.