[cfe-dev] libcxx: cstdio / stdio.h - missing file
Anton Smirnov
dev at antonsmirnov.name
Mon Aug 18 00:17:30 PDT 2014
2014-08-18 12:43 GMT+06:00 Ben Pope <benpope81 at gmail.com>:
> On Monday, August 18, 2014 02:35 PM, Anton Smirnov wrote:
>
>> 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
>>
>
> Yes, stdio.h is part of libc not libcxx and should exist in the sysroot
> *for the platform you're compiling for*.
>
>
> As i said it works ok for my dev machine and stdio.h is found on it
>> correctly.
>>
>
> It's likely that the compiler is configured to compile for your dev
> machine by default.
>
>
> I'm trying to make it working on ios (unrooted) where there are a lot of
>> restrictions as you know.
>>
>
> I don't know what those restrictions are, but you should probably tell
> your compiler where it should find the sysroot for the platform you wish to
> compile for.
I can see sysroot folder for XCode toolchain.
>
>
> 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.
>>
>
> That's probably not a great idea, the libc for your dev machine and the
> one on your ios device might differ.
I'm going to copy headers from XCode toolchain (sysroot) so i expect it to
be exactly (or 100% compatible) the same as on device.
>
>
> 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.
>>
>
> I'm lost.
>
It means i can just launch "echo > .. gcc .. -v" on unrooted device and
check out the output.
>
> Thanks and regards, Anton.
>>
>
> Good luck.
>
>
Thanks
>
> 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/c0e43617/attachment.html>
More information about the cfe-dev
mailing list