How to prevent macro redefinition

前端 未结 5 507
陌清茗
陌清茗 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:20

    This may be caused by Visual Studio pre-compiling headers for you. Be sure that all standard and microsoft headers are included before yours. Don't include microsoft headers in any of your .h files (it looks like you have windef.h and wingdi.h inlcuded in your glfw.h). Be sure that all your headers are side-effect free. The problem should then go away. Figuring out exactly what is causing it is generally very hard.

提交回复
热议问题