gpt4 book ai didi

swift - 构建完美的 Swift 错误

转载 作者:行者123 更新时间:2023-11-28 15:51:03 25 4
gpt4 key购买 nike

我刚刚克隆了 PerfectTemplate我机器上的存储库。当我尝试构建项目时,出现以下错误:

Compile Swift Module 'PerfectHTTPServer' (8 sources)
/Users/admin/Desktop/PerfectTemplate/Packages/PerfectHTTPServer-2.1.14/Sources/PerfectHTTPServer/HTTPContentCompression.swift:71:12: error: use of unresolved identifier 'UnsafeRawBufferPointer'
let b2 = UnsafeRawBufferPointer(start: dest, count: Int(stream.total_out))
^~~~~~~~~~~~~~~~~~~~~~
Swift.UnsafeBufferPointer:6:15: note: did you mean 'UnsafeBufferPointer'?
public struct UnsafeBufferPointer<Element> : Indexable, Collection, RandomAccessCollection {
^
<unknown>:0: error: build had 1 command failures
error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/admin/Desktop/PerfectTemplate/.build/debug.yaml
Macintosh:PerfectTemplate admin$

以前有没有人遇到过这个错误?

最佳答案

根据 this , UnsafeRawBufferPointer 是在 swift 3.0.1 中加入的。

关于swift - 构建完美的 Swift 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42308711/

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