Undefined reference to 'SDL_main'

前端 未结 5 792
没有蜡笔的小新
没有蜡笔的小新 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:11

    The only plausible reason for your problem I can think of is that when you created the file with main in it, you forgot to add it to build targets.

    enter image description here

    You should see CApp.cpp in the list where my main.cpp is. Right click on it and click Properties. Click on Build tab in the window that pops up. You should see this:

    enter image description here

    Click OK, hit Ctrl+F11 (Rebuild).

    Good luck.

提交回复
热议问题