在 Xcode 3 中构建依赖项和静态库
我正在尝试使用 XCode 3 获取 SoundCloud API 包装器的示例项目。有一些 开始时有一些基本说明,但我遇到了麻烦:
快速入门
在您的终端中:
- git clone
- git://github.com/soundcloud/cocoa-api-wrapper.git
- SoundCloudAPI cd SoundCloudAPI git submodule update --recursive --init
在您的 Xcode 项目中:
- 将 SoundCloudAPI.xcodeproj 拖到您的项目中,
- 将其添加为构建依赖项,
- 将静态库添加为 喜欢的目标
- 添加“[相对路径 SoundCloudAPI]/来源/SoundCloudAPI” 到您的标头搜索路径 构建设置
- 您还可以包括 通过添加 OAuth2Client 标头 “[相对路径 SoundCloudAPI]/Outsourced/OAuth2Client/Sources/OAuth2Client" 也是(虽然你可能不需要 他们)
我完全忽略了 In Your Xcode 项目之前的部分。我认为我已经正确完成了在这篇文章之后添加构建依赖项的所有操作,框架仍然标记为红色,就好像它们丢失了一样。有什么建议吗?
还有后面的三点也不是很清楚?有人可以更详细地解释一下这些吗?例如,标题搜索路径在哪里?构建设置在哪里?
非常感谢!
I'm trying to get the example project for an SoundCloud API wrapper working using XCode 3. There are some few basic instructions at the start, but I'm having trouble:
QuickStart
In your terminal:
- git clone
- git://github.com/soundcloud/cocoa-api-wrapper.git
- SoundCloudAPI cd SoundCloudAPI git
submodule update --recursive --init
In your Xcode project:
- drag SoundCloudAPI.xcodeproj into your project
- add it as a build dependency
- add the static library as
a liked target - add "[relative path to
SoundCloudAPI]/Sources/SoundCloudAPI"
to your header search path in the
build settings - you can also include
the OAuth2Client headers by adding
"[relative path to
SoundCloudAPI]/Outsourced/OAuth2Client/Sources/OAuth2Client"
too (although you might not need
them)
I've completely ignored the part before In Your Xcode project. I think I've done everything correctly to add the build dependency following this post, the frameworks are still marked in red as if they were missing. Any advice?
Also the three points after that are also not very clear? Could someone explain these in a bit more detail? For example, where is the header search path? and where are the build settings?
Thanks so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提示:鉴于您已使用 iphone 标记此问题,我假设您正在构建 iPhone 应用程序。在这种情况下,您需要添加 libSoundCloudAPI.a 作为直接依赖项,而不是 SoundCloudAPI.framework。
要在 Xcode 3 中设置标头搜索路径:
Tip: Given that you've tagged this question with iphone, I'll assume you're building an iPhone app. In that case, you need to add libSoundCloudAPI.a as a direct dependency, but not SoundCloudAPI.framework.
To set the header search path in Xcode 3: