### Object Files

The object files that are produced by IBM C and C++ Compilers can be linked to create either executable (.exe) files or dynamic link libraries (.dll files). Use the /Ge+ option to create an executable file or /Ge- to create a DLL.

Optimizing Object Code

The IBM C and C++ Compilers compiler can perform many optimizations, such as local and global optimizations, function inlining, and instruction scheduling.

Use the /O+ option to generate code that is optimized for speed.

Use /Gl to perform additional optimization during the linking step by removing unreferenced functions.

Use the /qtune option to tune your code for faster performance on a specific type of processor. By default, the compiler produces code that is tuned for all x86 processors.

Generating Debugger Information

To include debugger information in an object file, use the /Ti+ compiler option.

To include the debugger information in an executable file or DLL, use the /DEBUG linker option. If you use the icc command to invoke the linker and specify /Ti+, the /DEBUG option is automatically passed to the linker.

When you use /Ti+, do not turn on optimization (/O+, /Oc+, /Oi+, or /Os+). Because the compiler produces debugging information as if the code were not optimized, the information may not accurately describe an optimized program being debugged. Accurate symbol and type information is not always available.

If you cannot avoid debugging an optimized program, turn the scheduler off (/Os-), and step through the program at the assembly level, using the Register and Storage windows for information.

Compiler Output

Optimize Your Application

Summary of Compiler Options
Optimized Linking
Notes on Debugging Optimized Code