Setting Compiler Options - C/C++ Flags

 
 

Use this pane area to select one or more of the following compiler flag options:

Debugging Generates debugging information used by the xldb graphical debugger or dbx. Choosing this option is the same as entering the -g option on the command line.
Static Analysis Produces a .pdb file, in addition to the object file, for each source file compiled. Choosing this option is the same as entering the -qbrowse option on the command line.
Generate Listings Produces a compiler listing that includes an object, source, attributes, and cross-reference listing. Choosing this option is the same as entering the -qlist, -qattr, -qxref, and -qsource options on the command line.
HeapView Produces a .hd file for each file compiled. The HeapView Debugger uses the .hd files to examine heap usage during program execution. Choosing this option is the same as entering the -qhd option on the command line.

When you use the xlC compiler driver, you must link your executable program to the libhd.a library to make use of the HeapView Debugger. The libhd.a library is in the /usr/lpp/xlC/lib directory.

When you use a compiler driver other than xlC, you must link your executable program to the libhdc.a library to make use of the HeapView Debugger. The libhdc.a library is in the /usr/lib directory. In this case, if your first heap request is from a shared library, you must modify your source code to include a call to the hd_construct routine before any heap requests are made. If you do not, the HeapView Debugger automatically initializes itself.

Precompiled Headers Causes the compiler to use existing precompiled versions of header files for any user include header files referenced in the source file being compiled. The files are read from the .pcomp directory. The compiler automatically maintains and uses current precompiled headers. The compiler checks for a precompiled version of the file to be included if that is specified. If the file is found and it is current, it is used instead of recreating it. The Precompiled Headers option is ignored if it is specified with either the Test Coverage or Static Analysis option. Selecting this option is the same as entering -qgenpcomp and -qusepcomp options on the command line.

Note: The /etc/xlC.cfg configuration file defines default values used by the compiler to compile and link C or C++ programs.



Setting Compiler Options - C/C++
Setting Compiler Options - C/C++ Compilers
Setting Compiler Options - C/C++ Levels
Setting Compiler Options - C/C++ Include Directories