## Verifying the Compiler Version

To determine what version of the Carbide.c++ compiler you are using, follow the steps below.

NOTE The Carbide.c++ compiler is stored in <Carbide_Install_Dir>\x86Build\Symbian_Tools\Command_Line_Tools.

Figure 1. Getting compiler version using Command Prompt.

#### From the Carbide IDE

1. Create a new project for your target platform.

Consult the Carbide.c++ User Guide for information on creating new projects.

2. Create a new source file named version.c that contains the source code in Listing 1., and add the file to the new project.
3. Select version.c in the project window.
4. From the Project menu, choose Preprocess.

The Carbide.c++ compiler’s preprocessor reads its directives to produce a preprocessed version of version.c.

5. In the preprocessed source code window, look for the value of the variable version.

> This represents the version of the compiler. See Carbide.c++ Predefined Symbols for information on interpreting this value.

#### Listing 1. Verifying Carbide C/C++ Compiler Version

/* version.c */

/* The version of the compiler is */
/* assigned to variable "version." */

long version = __MWERKS__;

#### From the Command line

1. Create a new text file named version.c that contains the source code in Listing 1.
2. Preprocess the version.c file.

If you are using the command-line version of the Carbide C/C++ compiler on Microsoft Windows, type:

mwccSym2 -EP version.c

TIP For more information on invoking Carbide tools from the command line, see the Invoking Command-Line Tools.

3. Examine the preprocessor output.

The Carbide C/C++ compiler’s preprocessor reads its directives to produce a preprocessed version of version.c in the command line. Check the value assigned to the variable version, which represents the version of the compiler. See Carbide.c++ Predefined Symbols for information on interpreting this value.