libSDL, CMake and Mac OS X Lion

ⅰ亾dé卋堺 提交于 2019-12-05 13:07:49

I solved it by removing the .framework and unset my export variables to this framework, and I used the source to ./configure, make, make install. I removed all cmake build files and cmade and made my project again and everything was solved.

(For compiling SDL on OS X Lion you need to ./configure --disable-assembly)

As Ramon said, you need to link to SDLmain.lib for many platforms. So have something like this in your CMakeLists.txt file.

link_libraries (
   ${SDL_LIBRARY}
   ${SDLIMAGE_LIBRARY} # if using SDL_image, obviously
   SDLmain # Sadly not included in SDL_LIBRARY variable
)

Here is a simple page for more information: http://content.gpwiki.org/index.php/SDL:Tutorials:Setup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!