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 
13
  • which is the error message? Commented Apr 14, 2015 at 6: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 . Commented Apr 14, 2015 at 7:07
  • @tkanzakic I try to post some screen cut for error message but faild , because I'm new here , post image needs 10 reputation .. Commented Apr 14, 2015 at 7:12
  • Could you copy&paste error here? Does your library has all necessary slices? Commented Apr 14, 2015 at 7:25
  • possible duplicate of Including a static library in a Xcode project Commented Apr 14, 2015 at 7:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.