简体   繁体   English

使用添加的静态库构建项​​目时出错

[英]Error building project with added static library

When i run my project, i have errors, this project includes static library. 当我运行项目时,出现错误,该项目包含静态库。

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Composer", referenced from:
  objc-class-ref in libImageCollage_Simulator.a(ImageCollageTableViewController.o)
"_OBJC_CLASS_$_FirstTableViewCell", referenced from:
  objc-class-ref in libImageCollage_Simulator.a(ImageCollageTableViewController.o)
"_OBJC_CLASS_$_SecondTableViewCell", referenced from:
  objc-class-ref in libImageCollage_Simulator.a(ImageCollageTableViewController.o)
"_OBJC_CLASS_$_ThirdTableViewCell", referenced from:
  objc-class-ref in libImageCollage_Simulator.a(ImageCollageTableViewController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What can i do? 我能做什么?

Your Project was linked with Static Library, You havent added libImageCollage_Simulator.a Library in the Project, To add that Go to Build Phases in Project Settings, in Target Dependencies click + and add the library to your project 您的项目已与静态库链接,您libImageCollage_Simulator.a在项目中添加libImageCollage_Simulator.a库,要在项目设置中添加“转到构建阶段”,请在“目标相关性”中单击+并将库添加到项目中 在此处输入图片说明

Also Add Library Search Path here like this 在这里也添加图书馆搜索路径 Go to Build Phases and Double Click Library Search Paths, click plus and add the path of the library in your project 转到构建阶段并双击库搜索路径,单击加号,然后在您的项目中添加库的路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM