0

I have made a Xcode console project and have it include another project which is having an output of a lib[name].a. I have mentioned it as Target dependencies and have also linked the binaries with it. However during compilation of my console project, Xcode complains its not able to find the .a. I have also set it to always search user paths. i have also put in User Header and Library Search Path for $(BUILT_PRODUCTS_DIR) recursive. Any answers?

In another thread there is something about forceload but it doesn't mention clearly where

Community
  • 1
  • 1
Titus
  • 187
  • 2
  • 15

1 Answers1

0

the .a will not be in the User Header Search Path... that is for #include "*.h" you need to change the Library Search Path because it is a linker issue.

Grady Player
  • 14,399
  • 2
  • 48
  • 76
  • I have changed my library Search path to include $(BUILT_PRODUCTS_DIR) recursive. its still same effect.(edited my question to include this) – Titus Apr 11 '13 at 20:38
  • click on the .a in the built products and see where it is being built... it may be different, also make sure that it is listed as a target dependency to make sure that it is being built in the appropriate arch/mode. Also make sure that you are building the same arch's, if you only build 64 bit for the lib but build 32/64 for the product, it wont be there when you build the 32 bit part. – Grady Player Apr 11 '13 at 21:10
  • Hi Grady, i think it might be due to diff arch and the other lnker options. I followed the link www.blog.montgomerie.net/easy-xcode-static-library-subprojects-and-submodules and it worked. find the Other Linker Flags line, and add -ObjC and -all_load. Thank you – Titus Apr 11 '13 at 23:22
  • -ObjC and the other flag have to do with importing symbols once you have found the .a ... but if you got it figured out, well done. – Grady Player Apr 12 '13 at 04:08
  • I have started following the doc from iOS developer site. Its to the point [link](http://developer.apple.com/library/ios/technotes/iOSStaticLibraries/iOSStaticLibraries.pdf) – Titus Apr 13 '13 at 07:36