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

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 6 14:26:58 PDT 2016


> On Jul 6, 2016, at 2:24 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> 
> 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).

A build flag or a command line flag would be nice though.

I think I build with libc++ locally, but I still need to pass isysroot for some system headers though.

—
Mehdi



More information about the llvm-dev mailing list