Search code examples
iphonecgccipadjailbreak

Standard c library headers on iPhone/iPod touch/iPad


I have an iPod touch and iPad with gcc installed on them. However, everytime I try to compile my programs they always fail. I am trying to write c programs for the terminal, not GUI. I am missing the standard c/c++ libraries (stdio.h, etc.). Can anyone tell me where I can find these libraries?


Solution

  • On my system, with a vanilla install, the headers are here:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/include/ /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/

    And the libraries are here:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/ /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/

    Edit:

    The headers are not on the device. You will have to copy them over. The libraries should all be on the device.