Hello,
I have created a new project with the wizard of CW, and i need to know if this variable : __MWERKS__ is defined by default when we use CodeWarrior.
Thank you for your help.
Solved! Go to Solution.
Hello
Did you look at the {Install}\help|PDF\Power Architecture Build Tools Reference.pdf manual.
It says:
" __MWERKS__
Deprecated. Preprocessor macro defined as the version of the CodeWarrior compiler.
Syntax
__MWERKS__
Remarks
Replaced by the built-in preprocessor macro __CWCC__.
CodeWarrior compilers issued after 1995 define this macro with the compiler’s version. For example, if the compiler version is 4.0, the value of __MWERKS__ is 0x4000.
This macro is defined as 1 if the compiler was issued before the CodeWarrior CW7 that was released in 1995."
Note
A quick way to check whether the predefined macro is defined is to add following code to one of your application source file:
#ifdef __MWERKS__ #error "Test macro"#endif
Then try to build this file. If the predefined macro is defined you will get a message
"preprocessor #error directive"
I hope this helps
CrasyCat
Hello
- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
To retrieve that info (For version number smaller than 10.0):
- Start CodeWarrior
- Select Help -> About Freescale CodeWarrior
- Click on "Install Products"
- CodeWarrior version used is displayed on top in the Installed Products dialog.
To retrieve that info (For version number 10.0 and higher):
- Start CodeWarrior
- Select Help -> About CodeWarrior Development Studio
- Version and build number are indicated under "Installed Products" section.
CrasyCat
Hello,
Thank you for your help.
I try to targeting a PowerPC (a MPC5646B).
I using CodeWarrior 2.8, build 110511.
I have start a new project and folow the instruction for create a correct project. But I need to integrate some files and I need to know if __MWERKS__ is defined in internal option of CodeWarrior, or if I need to define this variable him self.
Good day.
Hello
Did you look at the {Install}\help|PDF\Power Architecture Build Tools Reference.pdf manual.
It says:
" __MWERKS__
Deprecated. Preprocessor macro defined as the version of the CodeWarrior compiler.
Syntax
__MWERKS__
Remarks
Replaced by the built-in preprocessor macro __CWCC__.
CodeWarrior compilers issued after 1995 define this macro with the compiler’s version. For example, if the compiler version is 4.0, the value of __MWERKS__ is 0x4000.
This macro is defined as 1 if the compiler was issued before the CodeWarrior CW7 that was released in 1995."
Note
A quick way to check whether the predefined macro is defined is to add following code to one of your application source file:
#ifdef __MWERKS__ #error "Test macro"#endif
Then try to build this file. If the predefined macro is defined you will get a message
"preprocessor #error directive"
I hope this helps
CrasyCat
Ok, thank you for your help.
Now I know CodeWarrior create this variable.
Good day.