构建完美的Swift错误

时间:2017-02-17 22:48:46

标签: swift build perfect

我刚刚在我的机器上克隆了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$ 

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

2 个答案:

答案 0 :(得分:1)

根据this,在quickift 3.0.1中添加了UnsafeRawBufferPointer。

答案 1 :(得分:0)

如果您尝试在Mac上部署Perfect,请确保您拥有最新的XCode(版本8.2.1或更高版本)并尝试再次运行它。