title: ld: warning: directory not found for option
body: <p>I have some code in <code>C</code> that was compiling fine just yesterday. This is on Mac OS X but I don't use XCode at all. Today, I went to add another header and source file, nothing unusual. But when I tried to compile, I got the following warnings and error:</p>
  
  <pre><code>ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.0/lib/darwin'
  ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin'
  ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin'
  ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/lib/darwin'
  ld: library not found for -lclang_rt.osx
  </code></pre>
  
  <p>As well, when I try to compile other codes that haven't been modified recently, I'm getting this error now too. I read this <a href="https://stackoverflow.com/questions/9458739/ld-warning-directory-not-found-for-option">thread</a> but the solution seems to be within XCode. Is there any way to fix this outside of XCode since I'm not using it for any of my projects and don't have anything under Build Settings?</p>
  
  <p>edit: in the specified directories where the warnings are coming from, I found that I have <code>../clang/6.1.0</code> rather than <code>../clang/6.0</code> so I think the issue could be that the computer auto-updated overnight. But I don't know how to specify the new directory</p>