__attribute__((used)) not recognized

Comments

2 comments

  • Avatar
    Jon Elliott

    Hi Emilien,

    "__attribute__((used))" is a GNU specific compiler directive.

    You could use the Linker Options > Keep Symbols project property. You need to add a leading underscore, so for your above example you would set the property to _my_function.

    Regards,

    Jon

     

    0
    Comment actions Permalink
  • Avatar
    Emilien

    Hi Jon,

     

    thanks for your response.

    I gave it a try before but did nut put the '_' before my_function.

    Now it works perfectly

     

    Regards

    Emilien

    0
    Comment actions Permalink

Please sign in to leave a comment.