我在源代码中有一个库,它构建在 .a 静态库中,但我需要 .dylib。因此,我在“构建设置”中选择 Mach-O-Type 作为“动态库”,但出现错误:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ MacOSX10.8.sdk -L/Users/abc/Library/Developer/Xcode/DerivedData/mylib-fwducbhnvcuzuzaopjfimtlylztm/Build/Products/Debug-filelist /Users/abc/Library/Developer/Xcode/DerivedData/mylib-fwducbhnvcuzuzaopjfimtlylztm/Build/中间体/mylib.build/Debug/mylib-osx.build/Objects-normal/x86_64/mylib-osx.LinkFileList -fobjc-link-runtime -framework Foundation -o /Users/abc/Library/Developer/Xcode/DerivedData/mylib -fwducbhnvcuzuzaopjfimtlylztm/Build/Products/Debug/libmylib-osx.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:未知选项字符“f”在:-fobjc-link-runtime
libtool 出于某种原因使用“-static”而不是“-dynamic”标志...我设置的兼容版本。你认为可能有什么问题?