| ||||||||
Technical Support Support Resources Product Information | GENERAL: CHECK USAGE OF SPECIFIC COMPILER VERSIONSInformation in this article applies to:
QUESTIONI know that I can setup a specific path to the toolchain which basically allows me to switch the tool chain version. This path setup is even stored in the *.UV2 project file. However, I would like to ensure that a specific toolset version is used for my project. Can I check the version number in my source code? ANSWERYou may use the predefined macro constant _ _ C51 _ _, _ _ CX51 _ _, _ _ C166 _ _, _ _ C251 _ _, or _ _ CA _ _ compiler which returns the version number of the compiler. This version number can be verified using preprocessor directives as shown below: #if (__C51__ < 700) || (__C51__ > 799) #error "Requires C51 Compiler V7.xx" #endif It is enough when just one C source module contains this version number check, since µVision is using the same compiler version for all compilation runs. MORE INFORMATION
SEE ALSO
Last Reviewed: Thursday, January 11, 2007 | |||||||
| ||||||||