msbuild: set a specific preprocessor #define in the command line

后端 未结 11 1774
借酒劲吻你
借酒劲吻你 2021-02-01 05:08

In a C++ file, I have a code like this:

#if ACTIVATE
#   pragma message( \"Activated\" )
#else
#   pragma message( \"Not Activated\")
#endif

I

11条回答
  •  滥情空心
    2021-02-01 05:26

    For VS2010 and up, see my answer here for a solution that requires no modification of the original project file.

提交回复
热议问题