Closed burbma closed 9 years ago
Hi @mmb90, flycheck
checker uses plain swift
frontend, which doesn't know about platform specific modules unless -sdk
is specified. You can set sdk
variable for the flycheck via this variable.
I'm afraid I'm still confused, how can I set this variable? Forgive my naivety.
@mmb90 I was getting the same error until I added the following to my init.el
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/")
If you don't know your SDK path, you can find it by running this command in terminal:
xcrun --show-sdk-path
Awesome, I fixed it with this. Thanks!
(defvar flycheck-swift-sdk-path)
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
I've installed swift-mode as instructed and I've already been using flycheck for other languages. I added:0: error: cannot load underlying module for 'CoreGraphics
(add-to-list 'flycheck-checkers 'swift)
also and the checker tries to run. I get this error, `Suspicious state from syntax checker swift: Checker swift returned non-zero exit code 1, but no errors from output: