静态库和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)中构建我的lib我有一个Build Failed后跟: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:未知选项字符'X'在:-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屋!