0

I just cloned the PerfectTemplate repository on my machine. When I try to build the project I get the following error:

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$ 

Did anyone faced with this error before ?

Stefan Ciprian Hotoleanu
  • 2,202
  • 1
  • 23
  • 30

2 Answers2

1

According to this, UnsafeRawBufferPointer was added in swift 3.0.1.

nakano531
  • 498
  • 7
  • 13
0

If you are trying to deploy Perfect on a mac, make sure you have the latest XCode (version 8.2.1 or later) and try running it again.

Rizwan Ahmed
  • 919
  • 13
  • 19