首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apple Match-O链接器错误库未找到Xcode 6.4

Apple Match-O链接器错误库未找到Xcode 6.4
EN

Stack Overflow用户
提问于 2015-09-27 10:43:11
回答 2查看 600关注 0票数 0

我正在尝试测试我的应用程序,我将配置中的“Debug”复制到了“Debug_Test”,以改变环境。我使用宏来更改源代码。

我已经向'Debug_test‘添加了预处理器宏,并将'Run’和'Test‘模式更改为'Debug_Test’。我已经测试过了,但是我得到了下面提到的错误。

代码语言:javascript
复制
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。

我认为还需要其他设置。但是,我是初学者,不知道设置。

如果有人知道解决方案,请告诉我。

EN

回答 2

Stack Overflow用户

发布于 2015-09-27 11:21:31

First,请确保在目标的Build Phase选项卡中添加AFNetworking库。如果已经存在,请删除并重新添加。

Second,确保您的Library Search Path设置正确:

票数 1
EN

Stack Overflow用户

发布于 2015-09-27 11:05:06

我可以用下面的代码解决同样的问题。

将其添加到构建设置中的库搜索路径中,并确保您选择了递归,删除其他可能是绝对路径的库路径。

代码语言:javascript
复制
$(PROJECT_DIR) 

也许它会对你有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32804043

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档