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

后端 未结 2 1067
一整个雨季
一整个雨季 2021-01-27 06:24

I have been searching up and down stackoverflow and Google for the correct way to compile and add the libtiff library to my existing iOS project in Xcode.

W

相关标签:
2条回答
  • 2021-01-27 06:34

    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"
    0 讨论(0)
  • 2021-01-27 06:45

    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.

    0 讨论(0)
提交回复
热议问题