Undefined reference to 'SDL_main'

前端 未结 5 783
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 04:59

I\'ve recently decided to try working with SDL with CodeBlocks 10.05. I started with the tutorial on http://www.sdltutorials.com/sdl-tutorial-basics and did my best to follo

5条回答
  •  北海茫月
    2020-12-11 05:35

    Define SDL_MAIN_HANDLED before you include the SDL libs:

    #define SDL_MAIN_HANDLED
    #include 
    #include 
    #include 
    

    More info: I'm using the SDL functions without the SDL_main be defined. Is that fine?

提交回复
热议问题