添加单元测试时的Mach-O链接器错误-XCode [英] Mach-O Linker Error When Adding Unit Tests - XCode

查看:221
本文介绍了添加单元测试时的Mach-O链接器错误-XCode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将OCUnit测试添加到现有项目(在XCode 4.6.3中).我按照此处的说明进行操作- http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/但是,我仅在尝试时会遇到78个Mach-O错误运行测试.我可以编译主要目标了.

I'm trying to add OCUnit tests to an existing project (in XCode 4.6.3). I followed the instructions here - http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/ however I'm getting 78 Mach-O errors only when trying to run the tests. I can compile the main target just fine.

需要注意的一件事是我还没有修改测试,它们只是标准模板.我不确定我在做什么错的例子.

One thing to note I have not modified the tests yet, they are just the standard template. I'm not sure example what I'm doing wrong.

一条错误消息

体系结构i386的未定义符号:"_ AudioComponentFindNext", 引用自: libNuanceSpeechAnywhere.a中的l651(libSpeechKit.a-i386-master.o) libNuanceSpeechAnywhere.a(libSpeechKit.a-i386-master.o)中的l652

Undefined symbols for architecture i386: "_AudioComponentFindNext", referenced from: l651 in libNuanceSpeechAnywhere.a(libSpeechKit.a-i386-master.o) l652 in libNuanceSpeechAnywhere.a(libSpeechKit.a-i386-master.o)

这是一堆错误的屏幕截图.

Here is a screen shot of a bunch of the errors.

推荐答案

您必须先将AudioUnit框架添加到项目中,然后重新构建.

You have to add AudioUnit framework to your project first and then rebuild it.

这是如何向项目中添加框架.

这篇关于添加单元测试时的Mach-O链接器错误-XCode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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