We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, Does anyone here ever use #message in other compilers? It is a useful tool for making sure that code with many #ifdef compiles the way you want without adding to the number of warnings. thanks, Martin
At the top of your code you have the following #defines Hold it right there. You're causing yourself problems you don't need by doing it this way. Definitions of macros used to control build features of the code don't belong into the source code itself. Once they're in there, they're needlessly hard to get out again, as you're just finding out. I would strongly suggest you use flags passed to the compiler on its invocation instead (-DDEBUG=1 etc., for most C compilers). That way, they'll be plainly visible to you in the make run's screen output (and in the .lst file, too). The visible hint won't be quite as wordy as your #message, but it's right there in front of your eyes. In uV2 you would use multiple targets in the same project, using the same set of source files, but with different flags each, to achieve the same effect.