[cfe-dev] libcxx: cstdio / stdio.h - missing file

Ben Pope benpope81 at gmail.com
Sun Aug 17 22:35:48 PDT 2014

On Monday, August 18, 2014 01:03 AM, Anton Smirnov wrote:
> Ben.
> I should be clear from the beginning.
> I already did cross-compiled Clang for ios and my question is not
> related to Apple LLVM completely.
> It's about libcxx.

It's about how the Clang from Apple LLVM finds headers.

> The problem is that libcxx header file cstdio includes file stdio.h
> which is absent.
> Should it be in system headers?

See below.

> At this time i do have working libclang in ios app and i'd like to add
> libcxx to it thouh i'm not sure if clang already includes libc++.
> When i copy libcxx headers and add -I to libclang command-line while
> parsing files i have stdio.h file absent deagnostics.

I'm not sure how you are specifying your command line.

> i'm trying to understand he reason.

The correct path is not included.

Something like the following, but you may have to apply common sense if 
the paths are different on your system.

echo "int main() {}" > helloworld.cpp && clang++ -arch armv7 -isysroot 
helloworld.cpp -v

I tested it this time, rather than randomly typing whilst half-asleep.

Looks like stdio.h will be picked up from:


More information about the cfe-dev mailing list