Perfect: Swift compiler error
Hello Perfect team, I tried following the README Quick Start instructions.
After I enter the following in Terminal:
git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
swift build
I get:
/Users/matthewtso/git/PerfectTemplate/Packages/PerfectThread-0.10.0/Sources/ThreadQueue.swift:210:97: error: cannot convert value of type 'UnsafeMutablePointer<Void>' (aka 'UnsafeMutablePointer<()>') to expected argument type 'UnsafeMutablePointer<_>'
/Users/matthewtso/git/PerfectTemplate/Packages/PerfectThread-0.10.0/Sources/ThreadQueue.swift:233:37: error: value of type 'Unmanaged<IsThisRequired>' has no member 'toOpaque'
error: exit(1): /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/matthewtso/git/PerfectTemplate/.build/debug.yaml
Checking my Swift version returns the following:
Apple Swift version 3.0 (swiftlang-800.0.30 clang-800.0.24)
Target: x86_64-apple-macosx10.9
I’m pretty new and not sure how to diagnose this, is there something I can try to fix this? Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (9 by maintainers)
most of people follow the tutorial :
swift build
, It works!swift package generate-xcodeproj
in terminal and Open the generated file “PerfectTemplate.xcodeproj” by Xcode IDE ,Ensure that you have selected the executable target and selected it to run on “My Mac” ,It failed!Solved:
swiftenv install DEVELOPMENT-SNAPSHOT-2016-06-20-a
swiftenv local DEVELOPMENT-SNAPSHOT-2016-06-20-a
in terminal. otherwise just skip;Note: Apple official document point out: Selecting a Swift toolchain affects the Xcode IDE only. To use the Swift toolchain with command-line tools, use
xcrun --toolchain
swift andxcodebuild -toolchain swif
t, or add the Swift toolchain to your path as follows:Hope this could help you