相关疑难解决方法(0)

如何为iOS构建GLib

我想在我的iOS应用程序中使用lasem,但编译lasem需要glib.如何建立它?

我从https://git.gnome.org/browse/glib/refs/tags下载glib-2.37.4 .然后我使用autogen.sh来获取配置文件,运行make并在mac上安装.我写了一个shell脚本尝试为iOS构建glib,如下:

export path=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/:$path
 export CC=arm-apple-darwin10-llvm-gcc-4.2
 export CFLAGS="-arch armv7"
 export LDFLAGS="-miphoneos-version-min=2.0"
 export LD="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld--disable-cxx"
./configure --prefix=/usr/local/ios/ --host=arm-apple-darwin10 --enable-static=yes --enable-shared=no CC=$CC CFLAGS=$CFLAGS CPP=cpp AR=ar LDFLAGS=$LDFLAGS LD=$LD
Run Code Online (Sandbox Code Playgroud)

当我运行此脚本时,返回为:

checking for arm-apple-darwin10-gcc... arm-apple-darwin10-llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/tinyfool/Downloads/glib-2.34.3':
configure: error: C compiler cannot create executables
Run Code Online (Sandbox Code Playgroud)

我能做什么?

glib ios

4
推荐指数
1
解决办法
4719
查看次数

标签 统计

glib ×1

ios ×1