11 years, 4 months ago.

How to add "messages" during compile ?

I have a large program (growing)

with several

#ifdef Use_This
..
#define Use_Another
..
#endif

I would like to have something like ..

Pi = 3.0/22.0;
#ifdef Use_22_Over_7_for_PI

#message "Pi is user defined

#else
 Pi = 3.14;
#message "Short pi value";

#endif

Is it possable with MBED Compiler ??

Cheers

Ceri

Dough !!

  1. warning "hi"

works, and still allows compilation

posted by ceri clatworthy 22 Apr 2014
Be the first to answer this question.