Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is how I got it to work. I'm putting it here so I can look it up later.</p> <p>It's likely this is imperfect, feel free to correct it. Comments try to separate what's generic from what's specific to the ICU library I was building.</p> <pre><code>// This is is required by the ICU configure step # must be ABSOLUTE PATH ICU_PATH=/Users/eric.grunin/Documents/dev/icu2 // First crucial bit: specify the Simulator DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer SDKROOT=$DEVROOT/SDKs/iPhoneSimulator4.3.sdk SYSROOT=$SDKROOT // for convenience ICU_FLAGS="-I$ICU_PATH/source/common/ -I$ICU_PATH/source/tools/tzcode/ " export CXXPP= export CXXPPFLAGS= // current version of gcc is missing some #include files, we have to get them elsewhere export CPPFLAGS="-I$SDKROOT/usr/include/c++/4.2.1/i686-apple-darwin10/ -I$SDKROOT/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I$SDKROOT/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I$SDKROOT/usr/include/ -I$SDKROOT/usr/include/c++/4.2.1/armv7-apple-darwin10/ -I./include/ -miphoneos-version-min=2.2 $ICU_FLAGS" // MUST specify -arch i386 export CFLAGS="$CPPFLAGS -pipe -arch i386 -no-cpp-precomp -isysroot $SDKROOT" export CPP="$DEVROOT/usr/bin/cpp $CPPFLAGS" export CXXFLAGS="$CFLAGS" export CC="$DEVROOT/usr/bin/gcc" export CXX="$DEVROOT/usr/bin/g++" // MUST add -arch i386 here. // Also: to avoid "undefined symbol: _Unwind_Resume", add -lgcc_eh export LDFLAGS="-arch i386 -L$SDKROOT/usr/lib/ -lgcc_eh -isysroot $SDKROOT -Wl,-dead_strip -miphoneos-version-min=2.0" cd $ICU_PATH mkdir simbuild cd simbuild // Not sure if --host is really needed $ICU_PATH/source/configure --enable-static --disable-shared --host=i686-apple-darwin10 gnumake </code></pre> <p>I'm probably not going to make a fat binary, because the ICU library is already very large and I need to keep the final app as small as possible.</p> <p><strong>Edited to add</strong></p> <p>I tried the fat library approach: it <strong>tripled</strong> the size of my app, alas.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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