[llvm-dev] [cfe-dev] clang++ build from source is not able to find C++ headers

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 6 14:24:05 PDT 2016


On 6 July 2016 at 14:17, Sean Silva via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> This gives an error for me. Any ideas?
>
> ```
> Sean:~/pg/llvm % ~/pg/release/bin/clang++ -v -isysroot `xcrun
> --show-sdk-path` -fsyntax-only test.cpp
> [...]
> test.cpp:1:10: fatal error: 'iostream' file not found
> #include <iostream>

Clang expects libc++ headers to be in /path/to/clang/../include/c++ on
OS X because they're provided with the toolchain rather than the SDK.
Either symlink them there, or build Clang with libc++ (I tend to
symlink).

Cheers.

Tim.


More information about the llvm-dev mailing list