<div dir="ltr">I think the libc++ folks recommend building libc++ along with clang.  If you do that, the c++ includes files will get copied under the relative include path and will be found automatically.  However, you'll need to set DYLD_LIBRARY_PATH in order to pick up the correct, just built, libc++ library.<div><br></div><div>But if you really do want to use the installed version of libc++, you can use xcrun to dynamically find the path via xcrun and set CPLUS_INCLUDE_PATH.</div><div><br></div><div>$ export CPLUS_INCLUDE_PATH=$(dirname $(xcrun -f clang))/../include/c++/v1</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 12, 2015 at 10:13 AM, Rinaldini Julien via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I’m trying to set the includes search path in clang, but I can’t figure out how to do it?<br>
<br>
I’m working on OSX and every time I compile a C/C++ code, I have to specify it with -isysroot (and I don’t want an alias, or a symlink to /usr/include) since the includes are not in a really standard path on OSX (e.g.: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++).<br>
<br>
Is there a way to do that?<br>
<br>
Thx<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>