0

コードのコンパイル時に次のエラーが発生しました。

Ld /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator/BusinessIdea.app/BusinessIdea normal i386
    cd /Users/owner12/Desktop/BusinessIdea
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator -L/Users/owner12/Desktop/BusinessIdea/BusinessIdea/Airship -F/Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator -filelist /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Intermediates/BusinessIdea.build/Debug-iphonesimulator/BusinessIdea.build/Objects-normal/i386/BusinessIdea.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework UIKit -framework Foundation -framework CoreGraphics -lUAirship-1.4.0 -lUAirshipFull-1.4.0 -o /Users/owner12/Library/Developer/Xcode/DerivedData/BusinessIdea-degqppvjmvixescuvttxsvcksqtf/Build/Products/Debug-iphonesimulator/BusinessIdea.app/BusinessIdea

Undefined symbols for architecture i386:
  "_AudioServicesCreateSystemSoundID", referenced from:
      -[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
      -[UAPushSettingsSoundsViewController tableView:didSelectRowAtIndexPath:] in UAPushSettingsSoundsViewController.o
  "_AudioServicesPlayAlertSound", referenced from:
      -[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
      -[UAPushSettingsSoundsViewController tableView:didSelectRowAtIndexPath:] in UAPushSettingsSoundsViewController.o
  "_AudioServicesPlaySystemSound", referenced from:
      -[UAPushNotificationHandler playNotificationSound:] in UAPushNotificationHandler.o
  "_CFHTTPAuthenticationCopyMethod", referenced from:
      -[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
      -[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
  "_CFHTTPAuthenticationCopyRealm", referenced from:
      -[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
      -[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
  "_CFHTTPAuthenticationCreateFromResponse", referenced from:
      -[UA_ASIHTTPRequest attemptToApplyProxyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)
      -[UA_ASIHTTPRequest attemptToApplyCredentialsAndResume] in libUAirship-1.4.0.a(UA_ASIHTTPRequest.o)

それらは非常に不可解であり、エラー全体をグーグルで調べてもあまり出てきません。なぜこれが起こるのか、これを解決する方法を誰かが知っていますか?

ありがとう!

4

1 に答える 1

2

次のフレームワークをプロジェクトに追加する必要があります。AudioServices、CFNetwork、SystemConfiguration、MobileCoreServices、zlib、および libxml2。libxml2 と zlib の場合Header Search Paths、ビルド設定に 2 つのエントリを追加する必要があります。/usr/include//usr/include/libxml2/

それらを追加するには (既に Xcode に含まれています)、これを実行します。 ここに画像の説明を入力

プラス ボタンをクリックして、上に挙げたすべてのフレームワークを追加します。(Cocoa.framework は必要ありません。これは私のプロジェクトからのものです)。下にスクロールすると、これはプロジェクトの概要にあります。

于 2013-03-28T00:00:53.957 に答える