How to use CROSSWORKS VERSION NUMBER in source code (C/C++)? #if #else

Comments

2 comments

  • Avatar
    Jon Elliott

    The following code should do it:

    #if __CROSSWORKS_MAJOR_VERSION > 4 || (__CROSSWORKS_MAJOR_VERSION == 4 && __CROSSWORKS_MINOR_VERSION >= 2)
    // version 4.2 and above
    #endif
    0
    Comment actions Permalink
  • Avatar
    Sam

    Thanks, this helps.

    0
    Comment actions Permalink

Please sign in to leave a comment.