Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The problem is:</p> <pre><code>C compiler cannot create executables </code></pre> <p>The reason:</p> <p>Your C compiler for iOS, arm-apple-darwin9-gcc, is a cross-compiler: it runs on a PC, but generates code for iDevices. Thus, it can't use the computer's native programming resources (libraries, header files). You have to tell it where to find iOS's own headers and libraries. You can do it by passing it the <code>-isysroot=/path/to/iOS_SDK/</code> option. For example, the following won't work out of the box:</p> <pre><code>/path/to/arm-apple-darwin10-gcc hello.c -o hello </code></pre> <p>But the following will:</p> <pre><code>/path/to/arm-apple-darwin10-gcc -isysroot /Developer/Platforms/iPhoneOS.platform/SDKs/iPhoneOS5.0.1.sdk hello.c -o hello </code></pre> <p>I don't use Xcode, neither do I have a Mac, so I don't know the exact location of the iOS toolchain sysroot, but it might be something like the one in the above command.</p> <p>And how to use all this with configure? Well, you have 3 compilation stages: preprocessing, compiling and linking. SO you have to tell the preprocessor and the compiler where can it find the headers, and the linker where can it find the libraries. (Particularily, you have to forget to tell the preprocessor where your sysroot is). So do something like this:</p> <pre><code>export CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 export CFLAGS="-arch armv7 -isysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" export CPPFLAGS="-isysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" export LDFLAGS="-arch armv7 -isysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" export CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-cpp-4.2 export AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar ./configure --disable-shared --without-ssl --without-libssh2 --without-ca-bundle --without-ldap --disable-ldap --host=arm-apple-darwin10 --build=arm-apple-darwin10 make sudo make install </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload