Passing preprocessor variable to nmake build environment
问题 I am having issues with building driver using nmake on Win7 x64 build environment. I am defining a preprocessor variable and passing it over the command line using - build /nmake "USER_C_FLAGS=/DMyVersion=3" And the build log is - ... /DMyVersion=3 /typedil- /wd4603 /wd4627 .... So, I clearly see the variable as part of the compiler options. Now in a header fie, I do #define otherVersion 10 #ifdef MyVersion #undef otherVersion #define otherVersion MyVersion #endif #define FileVersion