OGeek|极客世界-中国程序员成长平台

标题: objective-c - ld : framework not found GData [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 13:23
标题: objective-c - ld : framework not found GData

当我尝试构建应用程序时,为什么 Xcode 说它找不到我的 GData 框架? GData.framework 目录与其他 .frameworks(CoreData 等)位于同一目录(在 HD 和 Project navigator 中),并且它也添加到“Linked Frameworks and Libraries”面板中。

这是日志输出:

dyld: Library not loaded: @loader_path/../Frameworks/GData.framework/Versions/A/GData
Referenced from: /Users/zak/Library/Application Support/iPhone Simulator/5.1/Applications/897A560D-3AD5-42BE-958B-84DEA45A8F0E/MyApp.app/MyApp
Reason: image not found

这是完整的问题报告:

Ld /Users/zak/Library/Developer/Xcode/DerivedData/MyApp-fcvdbuanprmqvjafgwsuxlokvpsd/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd /Users/zak/Dropbox/xcodeProjects/MyApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
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/iPhoneSimulator5.1.sdk -L/Users/zak/Library/Developer/Xcode/DerivedData/MyApp-fcvdbuanprmqvjafgwsuxlokvpsd/Build/Products/Debug-iphonesimulator -F/Users/zak/Library/Developer/Xcode/DerivedData/MyApp-fcvdbuanprmqvjafgwsuxlokvpsd/Build/Products/Debug-iphonesimulator -F/Users/zak/Dropbox/xcodeProjects/MyApp/.. -filelist /Users/zak/Library/Developer/Xcode/DerivedData/MyApp-fcvdbuanprmqvjafgwsuxlokvpsd/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework CoreData -framework UIKit -framework GData -framework Foundation -framework CoreGraphics -o /Users/zak/Library/Developer/Xcode/DerivedData/MyApp-fcvdbuanprmqvjafgwsuxlokvpsd/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp

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

编辑得到它的工作,但现在我得到一个 GDataXMLNode.h 文件未找到错误



Best Answer-推荐答案


答案是您不能将 GData 框架添加到 iOS 项目中,因为它只是为 Mac OSX 设计的。您必须使用 GData 作为链接库。

关于objective-c - ld : framework not found GData,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10275740/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://jike.in/) Powered by Discuz! X3.4