生成iOS下的dylib

来源:互联网 发布:mysql主从复制配置 编辑:程序博客网 时间:2024/06/10 20:08

模拟器下:

`xcrun -sdk iphonesimulator --find clang` -Os -isysroot `xcrun -sdk iphonesimulator \

--show-sdk-path` -F`xcrun -sdk iphonesimulator --show-sdk-path`/System/Library/Frameworks \

-arch x86_64 -arch i386 -shared -o libprint.dylib print.c

真机下:

`xcrun -sdk iphoneos --find clang` -Os -isysroot `xcrun -sdk  iphoneos \

--show-sdk-path` -F`xcrun -sdk iphoneos --show-sdk-path`/System/Library/Frameworks \

-arch armv7 -arch armv7s -arch arm64 -shared -o libprint.dylib print.c


参考链接:https://www.synack.com/r-d-projects/building-libraries-for-ios/

原创粉丝点击