Setting CodeWarrior Environment Variables

Use environment variables on the host system to specify to the CodeWarrior command line tools where to find CodeWarrior files for compiling and linking. The following table describes these environment variables.

Table 1. Environment Variables for CodeWarrior Command-line Tools
This environment variable... specifies this information
MWCIncludes Directories on the host system for system header files for the CodeWarrior compiler.
MWLibraries Directories on the host system for system libraries for the CodeWarrior linker.
CWFolder CodeWarrior installation path on the host system.

A system header file is a header file that is enclosed with the less than (<) and greater than (>) characters in include directives. For example

  #include <stdlib.h> /* stdlib.h system header. */   

Typically, you define the MWCIncludes and MWLibraries environment variables to refer to the header files and libraries in the subdirectories of your CodeWarrior software.

To specify more than one directory for the MWCIncludes and MWLibraries variables, use the conventional separator for your host operating system command-line shell.

Listing: Setting Environment Variables in Microsoft® Windows® Operating Systems
rem Use ; to separate directory paths
set CWFolder=C:\Freescale\CW MCU v10.x
set MWCIncludes=%CWFolder%\MCU\S12lisa_Support\s12lisac\Include
set MWCIncludes=%MWCIncludes%;%CWFolder%\MCU\S12lisa_Support\s12lisac\Include
set MWCIncludes=%MWCIncludes%;%CWFolder%\MCU\S12lisa_Support\s12lisac\src
set MWLibraries=%CWFolder%\MCU\S12lisa_Support\s12lisac\lib