Configuration Files

You can decrease the time you spend entering command-line options and ensure consistency by using the configuration file to automate often-used command line entries. You can insert any valid command-line options into the configuration file. The compiler processes options in the configuration file in the order they appear followed by the command-line options that you specify when you invoke the compiler.

Note

Be aware that options in the configuration file will be executed every time you run the compiler. If you have varying option requirements for different projects, see Response Files.

How to Use Configuration Files For IA-32-targeted Compilations

The following example illustrates how to write configuration files for IA-32-targeted compilations. After you have written the .CFG file, simply ensure it is in the same directory as the compiler's executable file when you run the compiler. The text following the pound (#) character is recognized as a comment. For IA-32 compilations, the configuration file is icc.cfg.

## Sample icc.cfg file.

## Define preprocessor macro MY_PROJECT. -DMY_PROJECT

## Additional directories to be searched for include

## files, before the default. -Ic:/project/include

## Use the static, multi-threaded C run-time library. -MT

How to Use Configuration Files Targeted for Compilations on Itanium(TM)-based Systems

The following example illustrates how to write configuration files targeted for compilations on Itanium(TM)-based systems. After you have written the .CFG file, simply ensure it is in the same directory as the compiler's executable file when you run the compiler. (The pound (#) character defines the text that follows as a comment.) For compilations on Itanium(TM)-based systems, the configuration file is ecc.cfg.

## Sample ecc.cfg file.

## Define preprocessor macro MY_PROJECT. -DMY_PROJECT

## Additional directories to be searched for include

## files, before the default. -Ic:/project/include

## Use the static, multi-threaded C run-time library. -MT