簡體   English   中英

找不到Apple Match-O Linker錯誤庫Xcode 6.4

[英]Apple Match-O Linker Error library not found Xcode 6.4

我正在嘗試測試我的應用程序,並且確實在配置上重復將“調試”復制到“ Debug_Test”以更改環境。 我使用宏來更改源代碼。

我已將預處理器宏添加到“ Debug_test”,並將“運行”和“測試”架構更改為“ Debug_Test”。 我已經測試過了,但是出現了下面提到的錯誤。

Ld /Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Products/Debug_Test-iphonesimulator/ShareEx.appex/ShareEx normal x86_64
cd /Users/Kuma/Desktop/Test/TestClient
export IPHONEOS_DEPLOYMENT_TARGET=8.4
export 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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -L/Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Products/Debug_Test-iphonesimulator -F/Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Products/Debug_Test-iphonesimulator -filelist /Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Intermediates/TestClient.build/Debug_Test-iphonesimulator/ShareEx.build/Objects-normal/x86_64/ShareEx.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lAFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit -e _NSExtensionMain -fobjc-arc -fobjc-link-runtime -fapplication-extension -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.4 -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Intermediates/TestClient.build/Debug_Test-iphonesimulator/ShareEx.build/ShareEx.appex.xcent -framework ShareExtensionEmbedded -lPods-ShareEx -Xlinker -dependency_info -Xlinker /Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Intermediates/TestClient.build/Debug_Test-iphonesimulator/ShareEx.build/Objects-normal/x86_64/ShareEx_dependency_info.dat -o /Users/Kuma/Library/Developer/Xcode/DerivedData/TestClient-arjbprptvrrztsesaxtkhhsypwyc/Build/Products/Debug_Test-iphonesimulator/ShareEx.appex/ShareEx

ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

當然,在更改架構之前,我可以進行構建並將AFNetworking添加到AppExtension中。
我認為需要其他設置。 但是,我是初學者,不知道設置。

如果有人知道解決方案,請告訴我。

首先 ,請確保添加AFNetworking在你的目標的庫Build Phase選項卡。 如果已經存在,請刪除並重新添加。

在此處輸入圖片說明

其次 ,確保正確設置了“ Library Search Path

在此處輸入圖片說明

我可以使用以下代碼解決相同的問題。

將此添加到“構建設置”中的“庫搜索路徑”,並確保選擇“遞歸”,刪除其他可能是絕對路徑的庫路徑。

$(PROJECT_DIR) 

可能會對您有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM