Compiling external C++ library for use with iOS project

后端 未结 6 1600
滥情空心
滥情空心 2020-11-29 01:49

I\'m completely new to using C++ libraries, so appreciate this might be a bit specific for my case (let me know and I can provide more details).

I have an external

6条回答
  •  时光取名叫无心
    2020-11-29 02:08

    Here is what worked for me in Xcode 9 for iOS devices (iPhone X):
    1) Compile dylib with these flags set as the following:
    a) "Installation Directory": @executable_path/Frameworks b) "Runpath Search Path": @executable_path/Frameworks
    See the picture bellow:
    dylib settings in Xcode 9

    2) In the Xcode project where the dylib is used/linked:
    a) "Runpath Search Path":
    @executable_path/Frameworks
    b) In "Build Phase->Embed Libraries" make sure you select "Destination" as "Executables" and Subpath as "Frameworks", "Code sign on copy" checked:
    Setting the the linking iOS app

    This method is tested and used with Xcode 9.2 and iPhone X.

    David

提交回复
热议问题