Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Step 1) Build the static libraries.</strong></p> <p>I've built third-party libraries, statically, for the iPhone. After a bit of trial-and-error, here's what I found to be a good starting point:</p> <p><strong>Cross-Compile for iPhoneOS:</strong></p> <p>./configure --prefix=/path/to/project/external/iphoneos/ --host="arm-apple-darwin9" --target=arm-apple-darwin9 --enable-static --disable-shared CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 CFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp make make install</p> <p><strong>Cross-Compile for iPhoneSimulator:</strong></p> <p>./configure --prefix=/path/to/project/external/iphonesimulator --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 CFLAGS="-arch i686 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -mmacosx-version-min=10.5 -I/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/include/ -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk" CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar LDFLAGS="-arch i686 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -Wl,-dead_strip -mmacosx-version-min=10.5" make make install</p> <p>However, it's really just a starting point. It'll probably only work for projects with flexible Makefiles. If the above doesn't work, I've had to:</p> <ul> <li>turn on project-specific ./configure flags</li> <li>modify the configure script</li> <li>modify the generated Makefile</li> <li>modify autoconfigure scripts</li> </ul> <p>You can also turn on optimization flags for the iPhoneOS version (after you've got it working first).</p> <p><strong>Step 2) Add the libraries to your project's search path.</strong></p> <p>In your projects Info settings, set these Build options:</p> <p>Header Search Paths: "$(SRCROOT)/external/$(PLATFORM_NAME)/include"</p> <p>Library Search Paths: "$(SRCROOT)/external/$(PLATFORM_NAME)/lib"</p> <p>Other Linker Flags: [Add the flags for your static libs]</p> <p>Afterwards, you should be able to include the third-party libraries in your project.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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