调试时出现奇怪错误

时间:2012-02-19 14:12:25

标签: iphone ipad xcode3.2

我收到了这个错误

setenv IPHONEOS_DEPLOYMENT_TARGET 4.2
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/paxeramed/Desktop/TestWhy/build/Debug-iphoneos -F/Users/paxeramed/Desktop/TestWhy/build/Debug-iphoneos -filelist /Users/paxeramed/Desktop/TestWhy/build/TestWhy.build/Debug-iphoneos/TestWhy.build/Objects-normal/armv7/TestWhy.LinkFileList -dead_strip -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework CoreGraphics -framework AudioToolbox -framework AudioUnit -framework AVFoundation -framework OpenGLES -framework QuartzCore -o /Users/paxeramed/Desktop/TestWhy/build/Debug-iphoneos/TestWhy.app/TestWhy

ld: framework not found AudioUnit
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 failed with exit code 1

我尝试了以下

清理项目并重建 确保不重复@implementation的主要内容 添加了audiounit frmaework

我使用xcode 3.2.5,任何想法如何解决

我添加了这个苹果示例https://developer.apple.com/library/ios/#samplecode/SpeakHere/Introduction/Intro.html中的所有类 到我的项目除了委托和主,然后在min视图中我添加了以下代码来调用SpeakHereViewController

SpeakHereViewController* Edit = [[SpeakHereViewController alloc] initWithNibName:@"SpeakHereViewController" bundle:nil];

[self.navigationController pushViewController:Edit animated:YES];

[Edit release];

1 个答案:

答案 0 :(得分:1)

除了添加CoreAudio.frameworkAudioToolbox.framework之外, 请尝试删除AudioUnit。 这为我修好了。