<div dir="ltr"><span style="font-size:12.800000190734863px">Sorry, I should have clarified. The C/C++ headers are the ones which cannot be found. For clarity, here's the output of my tool with the -v flag (I've hidden some sensitive names with ***):</span><br style="font-size:12.800000190734863px"><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">clang version 4.0.0 (tags/RELEASE_400/final)</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">Target: x86_64-apple-darwin16.6.0</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">Thread model: posix</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">InstalledDir: </span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">clang Invocation:</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> "clang-tool" "-cc1" "-triple" "x86_64-apple-macosx10.12.0" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">usage" "-fsyntax-only" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "AddressOfTest.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "penryn" "-target-linker-version" "278.4" "-v" "-dwarf-column-info" "-debugger-tuning=lldb" "-resource-dir" "***/build-debug/bin/../lib/</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">clang/4.0.0" "-c-isystem" "/usr/local/include" "-stdlib=libc++" "-fdeprecated-macro" "-fdebug-compilation-dir" "***/build-debug" "-ferror-limit" "19" "-fmessage-length" "95" "-stack-protector" "1" "-fblocks" "-fobjc-runtime=macosx-10.12.</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">0" "-fencode-extended-block-</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">signature" "-fcxx-exceptions" "-fexceptions" "-fmax-type-align=16" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c++" "test.cpp"</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">clang -cc1 version 4.0.0 based upon LLVM 4.0.0 default target x86_64-apple-darwin16.6.0</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">ignoring nonexistent directory "/***/build-debug/bin/../</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">include/c++/v1"</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">ignoring nonexistent directory "/usr/include/c++/v1"</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">ignoring nonexistent directory "***/build-debug/bin/../lib/</span><wbr style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">clang/4.0.0/include"</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">#include "..." search starts here:</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">#include <...> search starts here:</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> /usr/local/include</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> /usr/include</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> /System/Library/Frameworks (framework directory)</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px"> /Library/Frameworks (framework directory)</span><br style="font-size:12.800000190734863px"><span style="font-size:12.800000190734863px">End of search list.</span><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Both my Xcode clang and my homebrew-installed clang find the headers through the relative path "../include/c++/v1". This won't be possible with my libtool unless (a) I move my libtool into the directory where clang is installed, or (b) I also distribute the C/C++ headers with my libtool. Both of these solutions is ugly, so I would prefer something nicer.</div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Thanks,</div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Scott</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 26, 2017 at 3:24 PM, Jacob Carlborg via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-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"><span class="">On 2017-06-26 20:27, scott constable via cfe-dev wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I had already installed Xcode and the command line tools, but I don't<br>
see how this would help.<br>
</blockquote>
<br></span>
Well, if you don't have Xcode and the command line tools installed there wouldn't be a GCC/Clang installation to find (I don't think it would be able to find the one in homebrew). But if you already have that installed, then unfortunately, I don't know.<br>
<br>
Although I'm not sure if you're talking about the C/C++ standard library headers or the internal compiler headers. The former should be found in the standard include paths, /usr/include. The latter are only search for in the relative include path, ../lib/clang/x.y.z/include, in my experience.<br>
<br>
In my tool [1] I solved that by embedding the internal headers in the executable [2][3].<br>
<br>
[1] <a href="https://github.com/jacob-carlborg/dstep" rel="noreferrer" target="_blank">https://github.com/jacob-carlb<wbr>org/dstep</a><br>
<br>
[2] <a href="https://github.com/jacob-carlborg/dstep/blob/master/clang/Compiler.d#L37-L38" rel="noreferrer" target="_blank">https://github.com/jacob-carlb<wbr>org/dstep/blob/master/clang/<wbr>Compiler.d#L37-L38</a><br>
<br>
[3] <a href="https://github.com/jacob-carlborg/dstep/blob/master/clang/Compiler.d#L52-L54" rel="noreferrer" target="_blank">https://github.com/jacob-carlb<wbr>org/dstep/blob/master/clang/<wbr>Compiler.d#L52-L54</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
/Jacob Carlborg<br>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</font></span></blockquote></div><br></div>