title: Building Swift in Sublime Text 2
body: <p>These build settings for my <code>swift.sublime-build</code> file seem to almost work:</p>
  
  <pre><code>{
      "cmd": ["swift $file_name"],
      "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
      "path": "/Applications/Xcode6-Beta5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/",
      "selector": "source.swift",
      "shell": true
  }
  </code></pre>
  
  <p>But I'm getting this on build:</p>
  
  <pre><code>&lt;unknown&gt;:0: error: cannot load underlying module for 'CoreGraphics'
  &lt;unknown&gt;:0: note: did you forget to set an SDK using -sdk or SDKROOT?
  &lt;unknown&gt;:0: note: use "xcrun -sdk macosx swift" to select the default OS X SDK installed with Xcode
  [Finished in 0.0s with exit code 1]
  </code></pre>
  
  <p>My application is console output only, so I don't even need <code>CoreGraphics</code>. I'm not sure how to subvert that requirement or how to use the <code>-sdk</code> parameter.</p>