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

Anton Smirnov dev at antonsmirnov.name
Sun Aug 17 23:35:25 PDT 2014


Thanks a lot, guys.

Now it's clear to me how it works  - AFAIK it requires stdio.h header that
should be found in system headers
as it's not included in libcxx include paths. Please correct my if i'm wrong

As i said it works ok for my dev machine and stdio.h is found on it
correctly.
I'm trying to make it working on ios (unrooted) where there are a lot of
restrictions as you know.
So now i'm going to add stdio.h and probably some other headers to ios app
bundle and add -I for .cpp command-line to process by libclang.

BTW as ios does not allow `fork` i can't just check the same to find
stdio.h on ios device but it's obvious it can't be found at this time.

Thanks and regards, Anton.



2014-08-18 11:35 GMT+06:00 Ben Pope <benpope81 at gmail.com>:

> 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
> /Applications/Xcode.app/Contents/Developer/Platforms/
> iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk helloworld.cpp -v
>
> I tested it this time, rather than randomly typing whilst half-asleep.
>
> Looks like stdio.h will be picked up from:
> /Applications/Xcode.app/Contents/Developer/Platforms/
> iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/
>
>
> Ben
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140818/c6b0138c/attachment.html>


More information about the cfe-dev mailing list