I'm working on a little project and I'm trying to use SDL2 library! I installed the SDL2.framework successfully in my library/framework folder. Then when I tried to link my headers and my framework in Xcode by adding the Library/Framework path for the framework and /Library/Framework/SDL2.framework/Headers for the headers in my app settings! Then I include . #include Afterward when I run the program there is an error but not about the fact it doesn't find headers.
我正在做一个小项目,我正在尝试使用SDL2库!我成功地在我的库/框架文件夹中安装了SDL2.framework。然后,当我尝试在Xcode中链接我的header和我的框架时,为框架添加库/框架路径,为我的应用设置中添加/库/框架/SDL2.framework/ header !然后我包括。#include当我运行程序时,有一个错误,但不是因为它没有找到标题。
Do you guys have a few tips about this?
你们对此有什么建议吗?
Thank you PS : sorry for the eventual English mistake
谢谢PS:很抱歉最后的英文错误
edit: i finally manage to run the program (i forgot to link binary) but now Xcode shut down right after it
编辑:我终于可以运行程序了(我忘了链接二进制文件),但是现在Xcode马上就关闭了。
2 个解决方案
#1
1
I finally could install it for those who are struggling with this ! 1. Download SDL2 source code on the website. 2. Compile the framework and copy SDL2.framework in the Library/Framework directory. 3. Create a classic Xcode project in C. In build settings. Then in Build Phases add SDL2.framework in the "Link binary with libraries" Indicate for the headers search paths : Library/Frameworks/SDL2.framework/Headers and Library/Frameworks for the framework search paths.
我终于可以把它安装给那些正在挣扎的人了!1。在网站上下载SDL2源代码。2。编译框架并在库/框架目录中复制SDL2.framework。3所示。在构建设置中使用c创建一个典型的Xcode项目。然后在构建阶段中,在“与库的链接二进制文件”中添加SDL2.framework,用于为框架搜索路径的标题搜索路径:库/框架/SDL2.framework/ header和库/框架。
Hope this can help some of you. Thank you all for the help !
希望这能对你们中的一些人有所帮助。谢谢大家的帮助!
#2
0
try the following tutorial to see if it helps - http://zamma.co.uk/setup-sdl2-in-xcode-osx/
试试下面的教程,看看是否有用——http://zamma.co.uk/setup-sdl2-in-xcode-osx/
#1
1
I finally could install it for those who are struggling with this ! 1. Download SDL2 source code on the website. 2. Compile the framework and copy SDL2.framework in the Library/Framework directory. 3. Create a classic Xcode project in C. In build settings. Then in Build Phases add SDL2.framework in the "Link binary with libraries" Indicate for the headers search paths : Library/Frameworks/SDL2.framework/Headers and Library/Frameworks for the framework search paths.
我终于可以把它安装给那些正在挣扎的人了!1。在网站上下载SDL2源代码。2。编译框架并在库/框架目录中复制SDL2.framework。3所示。在构建设置中使用c创建一个典型的Xcode项目。然后在构建阶段中,在“与库的链接二进制文件”中添加SDL2.framework,用于为框架搜索路径的标题搜索路径:库/框架/SDL2.framework/ header和库/框架。
Hope this can help some of you. Thank you all for the help !
希望这能对你们中的一些人有所帮助。谢谢大家的帮助!
#2
0
try the following tutorial to see if it helps - http://zamma.co.uk/setup-sdl2-in-xcode-osx/
试试下面的教程,看看是否有用——http://zamma.co.uk/setup-sdl2-in-xcode-osx/