模拟器下:
`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/