Skip to main content
Caio Gubel
Associate II
September 14, 2018
Question

Trying to define a constant in compile time to be used by a configuration - not working

  • September 14, 2018
  • 1 reply
  • 977 views

I created a configuration called "Release" and inside it I defined under C/C++ General --> Paths and Symbols a symbol following the advice from several "google" searches but when I try to use it inside a file like:

#[if defined(_RELEASE_MODE_)]​ 

...some code

#endif​ 

it failed in compilation time as the symbol was not recognized. Any hint?

    This topic has been closed for replies.

    1 reply

    Erwan YVIN
    ST Employee
    September 18, 2018

    Hello Caio ,

    You should do that in the platform settings in your compilation options

    -D_RELEASE_MODE_

    Best regards

    Erwan