Swift 5.0 编译器无法导入使用 Swift 5.1 编译的模块 [英] Module compiled with Swift 5.1 cannot be imported by the Swift 5.0 compiler

查看:66
本文介绍了Swift 5.0 编译器无法导入使用 Swift 5.1 编译的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Swift 5.1 编译的模块无法被 Swift 5.0 编译器导入

Module compiled with Swift 5.1 cannot be imported by the Swift 5.0 compiler

我需要在 swift 5.1 中编译我的 sdk,以便它可以在使用 swift 5 的项目构建中工作

I need to compile my sdk in swift 5.1 such that it should work in project build using swift 5

推荐答案

我的理解是模块稳定性刚刚包含在 Swift 5.1 中.Swift 5 好像还不能使用用 Swift 5.1 编译的框架,因为还不支持模块稳定性.

What I understand is module stability just included in Swift 5.1. Seem like Swift 5 still cannot use the framework that compiled with Swift 5.1 since module stability is not supported yet.

对于您的情况,需要使用特定 Swfit 版本的编译框架.即如果您要用于 Swift 5 项目,请使用编译的 Swift 5 导出您的 SDK.Swift 5.1 项目也是如此.

For your case, need to use compiled framework for specific Swfit version. i.e. If you gonna use for Swift 5 project, export your SDK with Swift 5 compiled. Same goes to Swift 5.1 project.

Swift 5.1,实现模块稳定性https://swift.org/blog/swift-5-1-released/

Swift 5.1, Module stability implemented https://swift.org/blog/swift-5-1-released/

Swift 5.0,模块稳定性仍在开发中https://swift.org/blog/abi-stability-and-more/

Swift 5.0, Module stability still under development https://swift.org/blog/abi-stability-and-more/

这篇关于Swift 5.0 编译器无法导入使用 Swift 5.1 编译的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆