RAD Studio
ContentsIndex
PreviousUpNext
Command Line Utilities

C++Builder provides a rich set of command line utilities in addition to its integrated development environment (IDE). These utilities enable you to use the command line to perform targeted compilation and other related functions, including file search and import of definition files.

Name 
Description 
The CodeGear C++ compiler (BCC32.EXE) is a resource compiler shell. It invokes BRCC32 and RLINK32, depending on the command-line syntax. 
The Borland resource compiler (BRC32) is a resource compiler shell. It invokes BRCC32 and RLINK32, depending on the command-line syntax. 
BRCC32 is the command-line version of the resource compiler. It accepts a resource script file (.RC) as input and produces a resource object file (.RES) as output.
RAD Studio provides a choice in resource compilers. You can choose to use either BRCC32 or RC (the Microsoft SDK resource compiler) on the ProjectOptionsResource Compiler dialog box. 
COFF2OMF converts a COFF import library file (InputFile) to a corresponding OMF import library file (OutputFile). COFF2OMF.EXE is located in the C++Builder \bin directory. 
CPP32.EXE produces a file that lists a C or C++ program, in which all #include files and #define macros have been expanded. While you do not need to use the preprocessor during normal compilation, you may find the list file helpful for debugging purposes.
Often, when the compiler reports an error inside a macro or an include file, you can get more information about what the error is if you can see the include files or the results of the macro expansions. In many multi-pass compilers, a separate pass performs this work, and the results of the pass can be... more 
DCC32 is the Delphi (Object Pascal) command line compiler.
To display command line help, enter:  
GREP (Global Regular Expression Print) is a powerful text-search program derived from the UNIX utility of the same name. GREP searches for a text pattern in one or more files or in its standard input stream. 
ILINK32 links object modules (.OBJ files), library modules (.LIB files), and resources to produce executable files (.EXE, .DLL, and .BPL files). ILINK32 creates and maintains a series of state files that contains this information. These state files allow subsequent links to be incremental, greatly reducing the total link time. 
Import libraries provide access to the functions in a Windows DLL. Import libraries contain records. Each record contains the name of a DLL and specifies where in the DLL the imported functions reside. These records are bound to the application by the linker and provide Windows with the information necessary to resolve DLL function calls. You can substitute an import library for part or all of the IMPORTS section of a module definition file.
IMPDEF takes as input a DLL name, and produces as output a module definition file with an EXPORTS section containing the names of functions exported by... more 
IMPLIB takes as input either DLLs or module definition files, or both, and produces an import library as output.
If you've created a Windows application, you've already used IMPORT32.LIB, the import library for the standard Windows DLLs. IMPORT32.LIB is linked automatically when you build a Win32 application in the C++Builder IDE and when using BCC32 at the command line.
An import library lists some or all of the exported functions for one or more DLLs. IMPLIB creates an import library directly from DLLs or from module definition files for DLLs (or a combination of the two). 
In C++, include files always have the file extension .h. 
MAKE 
MAKE.EXE is a command-line utility that helps you manage project compilation and link cycles. MAKE is not inherently tied to compiling and linking, but is a more generic tool for executing commands based on file dependencies. MAKE helps you quickly build projects by compiling only the files you have modified since the last compilation. In addition, you can set up rules that specify how MAKE should deal with the special circumstances in your builds. 
MAKE directives resemble directives in languages such as C and Pascal. In MAKE, directives perform various control functions, such as displaying commands onscreen before executing them. MAKE directives begin either with an exclamation point or a period, and they override any options given on the command line. Directives that begin with an exclamation point must appear at the start of a new line.
The following table lists the MAKE directives and their corresponding command-line options:

 
A macro is a variable that MAKE expands into a string whenever MAKE encounters the macro in a makefile. For example, you can define a macro called LIBNAME that represents the string "mylib.lib." To do this, type the line LIBNAME = mylib.lib at the beginning of your makefile. Then, when MAKE encounters the macro $(LIBNAME), it substitutes the string mylib.lib. Macros let you create template makefiles that you can change to suit different projects.
To use a macro in a makefile, type $(MacroName) where MacroName is a defined macro. You can use either braces or parentheses to enclose MacroName.
MAKE... more 
You write explicit and implicit rules to instruct MAKE how to build the targets in your makefile. In general, these rules are defined as follows:
  • Explicit rules are instructions for specific files.
  • Implicit rules are general instructions for files without explicit rules.

All the rules you write follow this general format:  
Use the -w option to specify message options for the CodeGear C++ compiler:
  • To enable a particular warning message, enter the -w option with a one- to three-letter option code.
  • To disable the warning message, enter the -w- option with a one- to three- letter option code.
 
You use module definition files with ILINK32. A module definition file is an ASCII text file that provides information to ILINK32 about the contents and system requirements of a Windows application. Use IMPDEF to create a module definition file.
The module definition file names the .EXE or .DLL, identifies the application type, lists imported and exported functions, describes the code section and data segment attributes, lets you specify attributes for additional code sections and data segments, specifies the size of the stack, and provides for the inclusion of a stub program. 
Precompiled header files can dramatically increase compilation speed by storing an image of the symbol table on disk in a file, then later reloading that file from disk instead of parsing all the header files again. Directly loading the symbol table from disk is much faster than parsing the text of header files, especially if several source files include the same header file.
To use precompiled header files, specify the various ‑H options in your BCC32 command.
Precompiled Header Options  
RLINK32.DLL is the resource linker that binds resources, in .RES file form, to an .EXE file, and marks the resulting .EXE file as a Windows executable. RLINK32.DLL also:
  • Links the resources by fixing up string tables and message tables and then binding these linked resources into the executable.
  • Is called by ILINK32 and is used for 32-bit resources.
 
TDUMP.EXE produces a file dump that shows the structure of a file.
TDUMP breaks apart a file structurally and uses the file's extension to determine the output display format. TDUMP recognizes many file formats, including .EXE, .OBJ, and .LIB files. If TDUMP doesn't recognize an extension, it produces a hexadecimal dump of the file. You can control the output format by using the TDUMP command-line options when you start the program.
TDUMP's ability to peek at a file's inner structure displays not only a file's contents, but also how a file is constructed. Moreover, because TDUMP verifies that a file's... more 
TLIB is a utility that manages libraries of .OBJ (object module) files. A library is a convenient way to deal with a collection of object modules as a unit.
The libraries included with the CodeGear C++ compiler were built with TLIB. You can use TLIB to build your own libraries, or to modify the CodeGear C++ libraries, your libraries, libraries furnished by other programmers, or commercial libraries you've purchased.
When TLIB modifies an existing library, TLIB creates a copy of the original library and gives it a .BAK extension.
You can use TLIB to:
  • Create a new library from a... more 
TOUCH.EXE updates a file's date stamp so that it reflects your system’s current time and date. 
Trigraphs are three-character sequences that replace certain characters used in the C language that are not available on some keyboards. Translating trigraphs in the compiler would slow compilation down considerably, so CodeGear C++ provides a filter named TRIGRAPH.EXE to handle trigraph sequences. 
RC is the command-line version of the standard Microsoft SDK resource compiler. It accepts a resource script file (.RC) as input and produces a resource object file (.RES) as output.
Both C++Builder 2009 and Delphi 2009 give you a choice of resource compilers. On the ProjectOptionsResource Compiler dialog box, you can select either of the following:
  • BRCC32.exe, the CodeGear resource compiler
  • RC.exe, the Microsoft platform SDK Resource Compiler

RC supports Unicode characters in resource files and file names, as well as new Vista resource types such as icons with alpha channel.
The actual filename of the RC compiler... more 
WSDLIMP generates code to represent the types and APIs that a WSDL document defines. This code can be used to write client applications that call on the Web Service that the WSDL (Web Services Description Language) document describes. If you want to write a server that implements the Web Service, one of the command line options tells the importer to generate implementation classes that you can then complete by filling in the bodies of the generated methods.
Note: WSDLIMP ignores any definitions in the WSDL document for which it can't generate code. That is, it can only import Web Services... more 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!