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

后端 未结 7 1046
一整个雨季
一整个雨季 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:01

    post the compiler commands. ex: g++/gcc ....

    you are probably not linking the library.

    http://content.gpwiki.org/index.php/SDL:Tutorials:Setup you should have the path to the lib, included in the ide. (I see you are using codeblocks)

    add to the linker settings: -lmingw32 -lSDLmain -lSDL

    http://www.sdltutorials.com/sdl-tutorial-basics

提交回复
热议问题