VS2012 C++ warning C4005: '__useHeader': macro redefinition

前端 未结 11 1821
一生所求
一生所求 2020-12-15 16:55

While migrating an old C++ project from Visual Studio 6 up to Visual Studio 2012, we came across an odd set of warnings from inside the standard Microsoft platform headers:<

11条回答
  •  無奈伤痛
    2020-12-15 17:54

    UPDATE:

    See Edmund's answer to this same question first -- give that a try. If it works, great! If not... try the following:

    ORIGINAL:

    Use the workaround mentioned on the "Workarounds" tab of this web page:

    http://connect.microsoft.com/VisualStudio/feedback/details/789965/resource-editor-warning-rc4005-on-toolset-visual-studio-2012-windows-xp-v110-xp

    Namely, add:

    #define _USING_V110_SDK71_ 1
    

    ...directly in the .rc file before it includes anything that would include the system headers that cause this warning.

提交回复
热议问题