I need use two different part of code conditioned from define, like this .
#define CHECK 1
#ifdef CHECK = 1
Test (1);
#endif
What is the correct sintax ? Can I define CHECK in CCSBuild->Variables ?
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I need use two different part of code conditioned from define, like this .
#define CHECK 1
#ifdef CHECK = 1
Test (1);
#endif
What is the correct sintax ? Can I define CHECK in CCSBuild->Variables ?
Thanks
Stefano De Blasiis said:Can I define CHECK in CCSBuild->Variables ?
Preprocessor defines that need to be passed to the compiler can be done from Project Properties->Build->Compiler->Advanced Options->Predefined Symbols, under --define option. You can read more about the option in the Compiler Users Guide.
Defining variables in Build->Variables tab is done for a different purpose - creating portable projects. More info on that is available here:
http://processors.wiki.ti.com/index.php/Portable_Projects