<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014-08-18 12:43 GMT+06:00 Ben Pope <span dir="ltr"><<a href="mailto:benpope81@gmail.com" target="_blank">benpope81@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Monday, August 18, 2014 02:35 PM, Anton Smirnov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks a lot, guys.<br>
<br>
Now it's clear to me how it works - AFAIK it requires stdio.h header<br>
that should be found in system headers<br>
as it's not included in libcxx include paths. Please correct my if i'm wrong<br>
</blockquote>
<br></div>
Yes, stdio.h is part of libc not libcxx and should exist in the sysroot *for the platform you're compiling for*.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As i said it works ok for my dev machine and stdio.h is found on it<br>
correctly.<br>
</blockquote>
<br></div>
It's likely that the compiler is configured to compile for your dev machine by default.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to make it working on ios (unrooted) where there are a lot of<br>
restrictions as you know.<br>
</blockquote>
<br></div>
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.</blockquote><div><br></div><div>I can see sysroot folder for XCode toolchain.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So now i'm going to add stdio.h and probably some other headers to ios<br>
app bundle and add -I for .cpp command-line to process by libclang.<br>
</blockquote>
<br></div>
That's probably not a great idea, the libc for your dev machine and the one on your ios device might differ.</blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BTW as ios does not allow `fork` i can't just check the same to find<br>
stdio.h on ios device but it's obvious it can't be found at this time.<br>
</blockquote>
<br></div>
I'm lost.<br></blockquote><div><br></div><div>It means i can just launch "echo > .. gcc .. -v" on unrooted device and check out the output.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks and regards, Anton.<br>
</blockquote>
<br>
Good luck.<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Thanks</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">
<br>
Ben<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>