2

I recently downloaded a fat, iOS static library for the popular C library boost. All my attempts in coaxing Xcode to link it have failed.

Things I have tried:

  • Adding it to Link Binary With Libraries.
  • Changing file type to Mach-O Object Code using File Inspector.
  • Renaming the file to libboost.a and adding -lboost to Other Linker Flags.

I am using Xcode 6.3 with the latest command line tools.

Vatsal Manot
  • 17,695
  • 9
  • 44
  • 80

1 Answers1

0

How To Link to an Xcode Project?

In Xcode Build Settings for your project: LIBRARY_SEARCH_PATHS

ofxiOSBoost/libs/boost/lib/ios 

(Set this to the directory where the static library is)

In Target under Build Phases for your project

Add to 'Link Binary With Libraries' the boost.a found in the ofxiOSBoost/libs/boost/lib/ios directory.

Renaming to libboost.a may be breaking it. The ofxiOSBoost renames this file as to not conflict with internal OSX libs in the linking process if in path / sys, so it links correctly with the iOS Binary.

If you are still having this problem, please open an issue here: https://github.com/danoli3/ofxiOSBoost/issues

Danoli3
  • 3,203
  • 3
  • 24
  • 35