error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup, but this time it's NOT a Windows/Console problem!

后端 未结 4 1535
礼貌的吻别
礼貌的吻别 2020-12-13 10:22

So, the infamous error is back. The project is complaining that it can\'t find the main() method (that\'s what the error means, right).

However I do have a main, and

4条回答
  •  时光说笑
    2020-12-13 10:29

    SDL_main.h is included automatically from SDL.h, so you always get the nasty #define.

    Just write:

    #include 
    #undef main
    

    And it should work fine

提交回复
热议问题