我该如何解决?
Ld build/Debug-iphonesimulator/iRadio.app/iRadio normal i386
cd /Users/ragopor/Desktop/iRadio
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk -L/Users/ragopor/Desktop/iRadio/build/Debug-iphonesimulator -F/Users/ragopor/Desktop/iRadio/build/Debug-iphonesimulator -F/Users/ragopor/Desktop/iRadio -filelist /Users/ragopor/Desktop/iRadio/build/iRadio.build/Debug-iphonesimulator/iRadio.build/Objects-normal/i386/iRadio.LinkFileList -mmacosx-version-min=10.5 -framework MediaPlayer -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/ragopor/Desktop/iRadio/build/Debug-iphonesimulator/iRadio.app/iRadio
ld: warning: in /Users/ragopor/Desktop/iRadio/MediaPlayer.framework/MediaPlayer, missing required architecture i386 in file
Undefined symbols:
".objc_class_name_MPMoviePlayerController", referenced from:
literal-pointer@__OBJC@__cls_refs@MPMoviePlayerController in iRadioAppDelegate.o
"_MPMoviePlayerContentPreloadDidFinishNotification", referenced from:
_MPMoviePlayerContentPreloadDidFinishNotification$non_lazy_ptr in iRadioAppDelegate.o
"_MPMoviePlayerScalingModeDidChangeNotification", referenced from:
_MPMoviePlayerScalingModeDidChangeNotification$non_lazy_ptr in iRadioAppDelegate.o
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
_MPMoviePlayerPlaybackDidFinishNotification$non_lazy_ptr in iRadioAppDelegate.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
答案 0 :(得分:5)
看起来您需要在项目中包含MediaFramework。
答案 1 :(得分:0)
在添加所有框架和编译源时,我遇到了同样的问题。解决我的问题的方法是删除~/ProjectFolder/MediaPlayer.framework/MediaPlayer.exec
文件,然后构建并运行,并且它有效!