0

I am trying to do this, and get several linker error. The parent project needs to access the class XHMessage from the child project(the static library ).This is just a example , infact I need to access many classes from the child project .

Before running it , I have finished 5 steps for solving it .

Step1 :

Click on parent project -> build phases -> Link Binary With Libraries and add childProject.framework.

Step2 :

Click on parent project -> build phases -> Target Dependencies and add childProject.framework again .

Step3 :

Click on parent project -> build setting -> Header Search Path and add child project's path so that parent project can find those classes in child project .
I also did this for build setting -> Framework Search Path .

Step4 :

Click on child project -> build setting -> Allow Non-modular Includes in Framework Modules and set Yes .

Last Step :

add -ObjC flag at the parent project's Other Linker Flags .

Following Link has the same problem , but those answers do not work for me . Link

I think I've done all the things but still can't solve this problem . How can I fixed it ? orz

IDE Version :

Xcode 6.1
Community
  • 1
  • 1
EI CHO
  • 86
  • 6
  • which is the error message? – tkanzakic Apr 14 '15 at 06:56
  • @tkanzakic if I did't do step1 & step2 ,the error message is Linker error , but if I do it , I get build failed without any error message . – EI CHO Apr 14 '15 at 07:07
  • @tkanzakic I try to post some screen cut for error message but faild , because I'm new here , post image needs 10 reputation .. – EI CHO Apr 14 '15 at 07:12
  • Could you copy&paste error here? Does your library has all necessary slices? – Azat Apr 14 '15 at 07:25
  • possible duplicate of [Including a static library in a Xcode project](http://stackoverflow.com/questions/3344120/including-a-static-library-in-a-xcode-project) – Tanuj Apr 14 '15 at 07:34
  • @Azat if I did't do step1 & step2 ,the error message is Linker error , but if I do it , I get build failed without any error message . And I try to post some screen cut for error message but faild , because I'm new here , post image needs 10 reputation .. – EI CHO Apr 14 '15 at 07:41
  • Which linker error exactly? Undefined symbols? Copy it as text here – Azat Apr 14 '15 at 07:42
  • @Tanuj sad , he also can't solve this problem . – EI CHO Apr 14 '15 at 07:51
  • @Azat Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_LKBadgeView", referenced from: objc-class-ref in systemInfoTableViewCell.o – EI CHO Apr 14 '15 at 07:55
  • @Azat Undefined symbols for architecture arm64: "_OBJC_METACLASS_$_XHMessageTableViewController", referenced from: _OBJC_METACLASS_$_spMessageTableViewController in spMessageTableViewController.o – EI CHO Apr 14 '15 at 07:57
  • @Azat 9 Linker error,build for iphone6 and simulator iphone5s – EI CHO Apr 14 '15 at 07:59
  • Your library simple doesn't have 64 bit slice – Azat Apr 14 '15 at 08:02
  • @Azat this library has a demo on Github , it's ok running on iphone6 . So I think it's not architecture support problem 0.0 . Here is the link https://github.com/leancloud/leanchat-ios , but the ReadMe file's language is Chinese . I've asked the author how to use the library , but it doesn't work . – EI CHO Apr 14 '15 at 08:12

0 Answers0