简体   繁体   中英

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 在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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