libiconv on ios

                                             libiconv-1.14 on ios

 

                  cross-compile libiconv-1.14 on MacOS10.7,I will introduce step by step:

 

              ⑴:download source code (http://ftp.gnu.org/pub/gnu/libiconv/)

 

              ⑵:execute build command

                   ./configure --prefix=/Users/jwang/libiconv --host=arm-apple-darwin --enable-static=yes --enable-shared=no  CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc CFLAGS="-arch armv6 -pipe -mdynamic-no-pic  -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/libxml2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -Wl,-dead_strip -miphoneos-version-min=2.0" LD=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld--disable-cxx

 

                    if  you meet with this problem:

                    unistd.h:668:28: error: crt_externs.h: No such file or directory

                   you can execute:

                 cp  /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/crt_externs.h  

                        /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/

               ⑶:execute make and make install all right

 

                              

                                    author:wangjie

                      email:[email protected]

你可能感兴趣的:(libiconv on ios)