When the #if 0 thing compiles it very much sounds like the macro is not defined at that point in the translation unit. Chances are, you're skrewed by per-file settings of the relevant .cpp file (did you select the particular .cpp file - and not the entire project - when viewing the property page ). Did you take a look at the build log (which is in my experience a better indicator of what's really going on than the command line display in the project settings)
You may also want to preprocess the file and add a couple of lines to output the definition of your macro, e.g.:
"NAME" = NAME
String literals are never expanded, so it should be easy to find in the preprocessed output.