SDL 2 Undefined Reference to “WinMain@16” and several SDL functions

后端 未结 7 1059
一整个雨季
一整个雨季 2020-12-06 19:41

I\'ve just installed SDL 2 and I have some serious problems. This is my code:

#include 

int main(int argc, char* argv[]){
SDL_Init( SDL_I         


        
7条回答
  •  醉酒成梦
    2020-12-06 20:24

    I solved this by exchanging the

    int main(int argc, char* argv[])
    

    line with

    int WINAPI WinMain(HINSTANCE hInstance,
                       HINSTANCE hPrevInstance,
                       LPSTR lpCmdLine,
                       int nCmdShow )
    

    No idea why to be honest, then again I moved on to the SFML.

提交回复
热议问题