How to prevent macro redefinition

前端 未结 5 526
陌清茗
陌清茗 2021-01-17 09:51

After working some time on my project, this warning begins to appear:

2>Game.cpp
2>c:\\program files\\microsoft sdks\\windows\\v6.0a\\include\\windef.h         


        
5条回答
  •  盖世英雄少女心
    2021-01-17 10:37

    The problem is in the file Game.cpp. Try to include windows.h before glfw.h. There is a guard in glfw.h which will prevent that warning:

    #ifndef APIENTRY
     #ifdef _WIN32
      #define APIENTRY __stdcall
     #else
      #define APIENTRY
     #endif
     #define GL_APIENTRY_DEFINED
    #endif // APIENTRY
    

提交回复
热议问题