0

I am trying to link my framework A with another non-standard framework B, developed other folks. I am adding B to the "link Binary with Libraries" build setting of A. This allows the compiler to locate the header file of B i am including at A. However, i am still getting linker errors of "undefined symbols".

By the way, for linking B into A, i opened the Xcode project of B, inspected the "Products" filter, and then followed the path to 'B.framework' and copied that into A's folder. Anything wrong with that? What could be the issue?

I am pretty sure there is no target architecture differences of A and B; they are targetting the same platform.

sramij
  • 4,775
  • 5
  • 33
  • 55
  • "I am adding B to the "link Binary with Libraries" build setting of A. This allows the compiler to locate the header file of B i am including at A" No. The header file is located through the header search paths, _not_ through the link binary phase. The fact that you can compile does _not_ prove that the framework is properly linked. And clearly it is not. – matt Jan 11 '15 at 15:17
  • @matt I am not saying that locating a header is an indication that linking should be good as well! all i am saying is that it indicates that i have successfully integrated B into A's solution. – sramij Jan 12 '15 at 06:07

1 Answers1

0

I solved my own problem as follows. It turns out that the undefined symbols are not being exported from B.framework, while they are being used by A. I was able to fix this by modifying the .exp (export table) file which comes along with B.framework, and adding the symbols A requires. Following that, in order to make sure execution would have no issues, i had to make sure also that B.framework is copied into the target device as well; so A could find it during execution.

sramij
  • 4,775
  • 5
  • 33
  • 55