title: Clang Environment variable for linker path
body: <p>I wrote a little Python script to extract the XCode CLTools to a specific directory. (You can find it <a href="https://github.com/NiklasRosenstein/xcode-local-cltools" rel="nofollow">here</a> if you want it). Now I just need to get an <code>activate</code> script working in order to use the tools from the command-line. </p>
  
  <p>The script updates the <code>PATH</code> and <code>C_INCLUDEPATH</code>, <code>CPLUS_INCLUDE_PATH</code>, etc. but now I get linker errors. What environment variables can I use? <code>C_LINKER_PATH</code>, <code>CPLUS_LINKER_PATH</code>? Or is there another way to make it work?</p>
  
  <p>Since the directory structure is the same as if it was merged into <code>/</code>, maybe I can just tell it <code>~/Clang-5.1</code> is your new <code>/</code> and look from there?</p>
  
  <hr>
  
  <pre><code>ABSDIR=$(pwd)/$(dirname ${BASH_SOURCE[0]})
  INCLUDE="$ABSDIR/usr/include"
  
  export PATH="$ABSDIR/Library/Developer/CommandLineTools/usr/bin:$PATH"
  export C_INCLUDE_PATH="$INCLUDE:$C_INCLUDE_PATH"
  export CPLUS_INCLUDE_PATH="$INCLUDE:$INCLUDE/c++/4.2.2:$CPLUS_INCLUDE_PATH"
  export OBJC_INCLUDE_PATH="$INCLUDE:$OBJC_INCLUDE_PATH"
  export OBJCPLUS_INCLUDE_PATH="$INCLUDE:$INCLUDE/objc:$OBJCPLUS_INCLUDE_PATH"
  </code></pre>