静态库和 Swift [英] Static Library and Swift
问题描述
所以我正在 Swift 中开发一个 iOS 项目,我想创建一个包含一些有用内容的静态库.
So I'm working on an iOS project in Swift, and I wanted to create a Static library with some useful stuff in it.
我的问题是当我尝试在 Xcode(版本 6.3)中构建我的库时,我有一个构建失败",后跟:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -Xlinker
My problem is when I try to build my lib in Xcode (version 6.3) I have a "Build Failed" followed by : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character 'X' in: -Xlinker
我从未见过这个,这也不是我的第一个静态库.所以我想我可能与我只使用 Swift 类的事实有关.
I've never saw this and it's not my first static lib. So I was thinking I may be linked to the fact that I'm using exclusively Swift class.
大家怎么看?提前致谢.
What do you guys think ? Thank you in advance.
推荐答案
从 Xcode 9 beta 4 开始,Xcode 原生支持带有 Swift 源代码的静态库.
As of Xcode 9 beta 4, Xcode natively supports static libraries with Swift sources.
这篇关于静态库和 Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!