iPhone链接器错误(AudioStreamer) [英] iPhone Linker Error (AudioStreamer)

查看:44
本文介绍了iPhone链接器错误(AudioStreamer)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Matt Gallagher的音频流项目.我下载了代码/项目,它可以正常运行/编译/链接.

I'm using Matt Gallagher's Audio Streaming Project. I downloaded the code/project and it runs/compiles/links just fine.

问题是当我尝试将AudioStreamer类集成到我自己的项目中时.我添加了所有必要的框架,并检查了项目设置,以确保它们尽可能匹配Matt的项目.

The problem is when I try to integrate the AudioStreamer class into my own project. I added all the necessary frameworks and checked over the project settings to make sure they match Matt's project as much as possible.

我还没有添加Matt的任何代码(AudioStreamer类除外).我现在要做的只是定义此功能:

I haven't added any of Matt's code yet (except for the AudioStreamer class). All I'm doing for now is defining this function:

- (void)createStreamer {
    streamer = [[AudioStreamer alloc] initWithURL:audiourl];
}

如果我注释掉该函数中的唯一一行,则项目可以正常编译/链接.如果我离开该行,则会出现此错误(如果我正确理解,则是链接器错误):

If I comment out the only line in that function the project compiles/links fine. If I leave that line there I get this error (which if I understand correctly is a linker error):

"_OBJC_CLASS_$_AudioStreamer", referenced from:
objc-class-ref-to-AudioStreamer in AudioViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

我搜索了此错误,大多数人都收到了此错误,因为他们忘记了包含某个框架.我拥有我项目中需要的所有框架.

I googled this error and most people get it because they forgot to include a certain framework. I have all the frameworks I need in my project.

有人知道导致此错误的其他原因吗?我可能会忽略某些设置吗?

Does anyone know any other reason why this error could occur? Is there some setting that I may be overlooking?

除了在Matt的项目中将arm6,arm7和我的i386上的build体系结构设置为build之外,大多数项目设置都相同.我尝试为模拟器和设备进行编译,但出现相同的错误.

Most of the project settings are the same except for the build architecture being set to arm6,arm7 in Matt's project and i386 on mine. I tried compiling for both simulator and device and I get the same error.

我唯一能想到的是Matt的项目是2009年(很旧)的,所以新的xcodes的默认配置可能有所更改吗?

The only thing I could think of is that Matt's project is dated 2009 (pretty old) so maybe something changed in the default configuration in the new xcodes?

如果有人能提供任何见解,我将不胜感激.

If anyone can provide any insight I'd appreciate it.

谢谢.

推荐答案

听起来您需要将AudioStreamer.m添加到目标中.

It sounds like you need to add AudioStreamer.m to your target.

这篇关于iPhone链接器错误(AudioStreamer)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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