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

后端 未结 11 1660
借酒劲吻你
借酒劲吻你 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:31

    It should probably be:

    #ifdef ACTIVATE
    #   pragma message( "Activated" )
    #else
    #   pragma message( "Not Activated")
    #endif
    

提交回复
热议问题