gpt4 book ai didi

ios - 使用 Swift 编译静态库时出错 "unknown option character ` X' in : -Xlinker"

转载 作者:IT王子 更新时间:2023-10-29 05:04:11 26 4
gpt4 key购买 nike

<分区>

在将要编译的 swift 文件添加到静态库时看到此错误。使用 XCode 6.0 (6A215l)

完整的 libtool 错误:
Libtool DerivedData/SwiftTest/Build/Products/Debug-iphonesimulator/libstatic.a 正常 i386
cd/Users/al/dev/ios/SwiftTest2
导出 IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode6-Beta.app/Contents/Developer/usr/bin:/usr/bin :/bin:/usr/sbin:/sbin"
/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only i386 -syslibroot/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/al/dev/ios/SwiftTest2/DerivedData/SwiftTest/Build/Products/Debug-iphonesimulator -filelist/Users/al/dev/ios/SwiftTest2/DerivedData/SwiftTest/构建/中间体/SwiftTest.build/Debug-iphonesimulator/static.build/Objects-normal/i386/static.LinkFileList -ObjC -L/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -rpath -Xlinker/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -force_load -Xlinker/Applications/Xcode6-Beta。 app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a -Xlinker -sectalign -Xlinker __SWIFT -Xlinker __ast -Xlinker 4-Xlinker-sectcreate-Xlinker__SWIFT-Xlinker__ast-Xlinker/Users/al/dev/ios/SwiftTest2/DerivedData/SwiftTest/Build/Intermediates/SwiftTest.build/Debug-iphonesimulator/static.build/Objects-normal/i386/static.swiftmodule -o/Users/al/dev/ios/SwiftTest2/DerivedData/SwiftTest/Build/Products/Debug-iphonesimulator/libstatic.a

我在这里创建了一个示例项目,错误发生在一个全新的项目中:https://github.com/amleszk/SwiftTest/tree/cd94ca21d817fed336b1a3bfc774a13608e0d1ca

要重现,请检查项目并构建 SwiftTest 目标,它依赖于静态库。任何帮助表示赞赏

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com