How to make libtiff for an Xcode project and an iOS application?

梦想的初衷 提交于 2019-12-02 09:25:16

Here are the steps for adding a library to your iOS project in XCode 4.6.2 (should be similar in old versions of XCode):

  • Click on your project name in the project navigator (left pane)
  • Click on your Target and select "Build Phases"
  • Under "Link Binary With Libraries" click "+" (at the end of the existing list)
  • Select "Add Other.." button in the popover window, it will open the file browser window
  • Browse to and select the library that you want to add and click "Open"
AOphagen

I have pasted a bash script that cross-compiles libtiff version 3.9.6 on a Mac for iOS 6.1 to be used on devices and in the simulator. You will have to adapt it to your needs. Also see this tutorial for hints. It creates a fat library for both compilation targets.

rakmohs answer is also correct, but only part of the solution. You add the folder with the fat library in the "Add Other.." dialogue he proposes.

Then you also add libz.dylib! After that, I could use libtiff in my app on my device and on the simulator.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!