I would like to conditionally exclude some lines of code from my source. In the past, I've used #ifdef <MYMACRO>/#else/#endif constructs with command line compilers. I would like to do the same with LabWindows. However I can't find anything in the IDE where I can pass a "command line" argument like -D<MYMACRO> to the LabWindows compiler (and have it saved as part of the project). I really don't want to add a dummy header file (.h) which defines <MYMACRO>.
The one thing I did find is the "Toggle Exclusion" item in the Edit menu. The only problem with this is that the excluded line information is not saved with the project. If I "resolve the exclusion" then the change is associated with the source file and I don't want the exclusions in other projects that use the same source.
Of course, about 2 minutes after I posted the original message, I found what I wanted under Options->Build Options. I had been desperately looking under the Build menu.
That's great that you found the solution. You may also find this useful. _CVI_DEBUG_ is defined to be 1 if the Build==> Configuration is set to debug mode. It can be used in #ifdef statements to exchange or exclude code based on the configuration setting being Release or Debug.