xcode - 添加AVFountation框架 [英] xcode - Add AVFountation Framework

查看:228
本文介绍了xcode - 添加AVFountation框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用xcode 4.2创建一个iphone应用程序,并尝试使用AVFoundation Framework来播放一些无线电流。

当我将它导入项目的框架和构建时,我得到以下内容警告:

I'm creating an iphone app using xcode 4.2, and trying to use the AVFoundation Framework to play some radio stream.
When i import it to the project's frameworks and the build, i get the following warning:

ld:警告:忽略文件/Users/xanthos/Documents/tabbartest/AVFoundation.framework/AVFoundation,文件是为不支持的文件构建的格式不是被链接的体系结构(i386)

当然当使用框架的任何东西(例如AVAudioSession)时,我会收到类似的错误:

and of course when using anything of the framework (eg AVAudioSession) i get errors like:

架构i386的未定义符号:
_ OBJC_CLASS _ $ _ AVAudioSession,引自:
objc-class-ref在RadioStreamer.o

我读了很多关于如何编译AVFoundation库的帖子,我真的不知道得到它,我真的没有经验所有这些。我可以看到有关于图书馆链接的内容,但并不完全理解它。

I've read so many posts about how to compile AVFoundation Library, by i really don't get it, i'm really inexperienced in all these. I can see there's something with the linking of the library, but not completely understand it.

请提供任何线索?

提前谢谢。

Any clues please?
Thank you in advance.

推荐答案

看起来你已经从某个地方复制了 AVFoundation.framework 你的项目目录。那是错的。您只需将其添加到项目的Link Binary With Libraries构建阶段:

It looks like you have you copied AVFoundation.framework from somewhere to your project directory. That's wrong. You just need to add it to the "Link Binary With Libraries" build phase of your project:


  1. 在Xcode中,选择项目中的项目左侧的导航器。

  2. 在中间的主区域中选择构建阶段选项卡。

  3. 打开使用库链接二进制文件 'section。

  4. 点击'+'。

  5. 选择`AVFoundation.framework。然后点击添加。

  1. In Xcode, select the project in the navigator on the left.
  2. Select the 'Build phases' tab in the main area in the middle.
  3. Open up the 'Link Binary With Libraries' section.
  4. Click the '+'.
  5. Select `AVFoundation.framework. and click 'Add'.

这篇关于xcode - 添加AVFountation框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆