【问题标题】:iOS-Hierarchy-Viewer build failed : linker command failed with exit code 1iOS-Hierarchy-Viewer 构建失败:链接器命令失败,退出代码为 1
【发布时间】:2012-09-15 14:04:03
【问题描述】:

我找到了一个名为“iOS-Hierarchy-Viewer”的项目,它可以检查 ios 原生视图。 所以我创建了一个名为“ViewViewer”的项目,并作为“安装”的解决方法只是 README.md 描述。 但是,当我构建它时,它失败了。

错误:

Ld /Users/hundsun/Library/Developer/Xcode/DerivedData/iphone-gsuyenresnoeexcuqguzciigntxr/Build/Products/Debug-iphonesimulator/ViewViewer.app/ViewViewer normal i386
cd /Users/hundsun/Documents/projects/ViewViewer
setenv MACOSX_DEPLOYMENT_TARGET 10.6
......
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_NSAttributeDescription", referenced from:
      objc-class-ref in libiOSHierarchyViewer_fat.a(HVCoreDataHandler.o)
  "_OBJC_CLASS_$_NSRelationshipDescription", referenced from:
      objc-class-ref in libiOSHierarchyViewer_fat.a(HVCoreDataHandler.o)
  "_OBJC_CLASS_$_NSFetchRequest", referenced from:
      objc-class-ref in libiOSHierarchyViewer_fat.a(HVCoreDataHandler.o)
  "_OBJC_CLASS_$_NSEntityDescription", referenced from:
      objc-class-ref in libiOSHierarchyViewer_fat.a(HVCoreDataHandler.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

对不起,我对 ios、object-C、C 和 xcode 的了解很少。 感谢您告诉我如何逐步解决问题。 谢谢你的详细回答!!!

【问题讨论】:

  • 如果您刚刚开始,使用 Spark Inspector 之类的工具可能会更轻松。它不是免费的,但您不必手动构建任何东西或配置您的项目。 (完全披露:我是该工具的作者!)

标签: ios linker command hierarchy viewer


【解决方案1】:

请将 CoreData.framework 添加到框架部分。

【讨论】:

    猜你喜欢
    • 2022-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-03
    • 2015-08-06
    相关资源
    最近更新 更多