您的位置:首页 > 移动开发 > IOS开发

libiconv on ios

2012-01-19 17:24 281 查看
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:jwang@keqisoft.com
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: