相关疑难解决方法(0)

将Apache Portable Runtime交叉编译到iPhone

这是关于iPhone交叉编译的上一个问题的后续内容:
为官方iPhone SDK交叉编译基于Autotools的库

基本上,我正在尝试为iPhone编译Apache Portable Runtime(APR)版本1.3.8(最新版).我目前在配置步骤中遇到以下错误:

checking for working PROCESS_SHARED locks... configure: error: in `/Users/michaelsafyan/Downloads/apr-1.3.8':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

我通过"iphone3.1-configure --disable-dso --enable-threads"调用"configure"脚本,其中"iphone3.1-configure"是我编写的以下脚本,用于调用"配置"脚本:

#! /bin/bash

#
# Program  : iphone3.1-configure
# Authors  : Michael Aaron Safyan (michaelsafyan@gmail.com)
# Synopsis :
#            This program runs the "configure" script generated by the
#            GNU Autotools in order to cross-compile thirdparty libraries
#            for the iPhone 3.1 SDK. Run this script while in a …

iphone gcc autotools cross-compiling iphone-sdk-3.0

8
推荐指数
1
解决办法
6804
查看次数

为iPhone编译C lib

我正在尝试编译ZeroMQ C绑定以便能够在iPhone上使用它,这是我的配置选项:

./configure --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 CFLAGS="-pipe -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=3.1.2 -gdwarf-2 -mthumb -I/Library/iPhone/include -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -mdynamic-no-pic" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar AS=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/as LIBTOOL=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool STRIP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip RANLIB=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib

它实际上配置和编译很好,但是当我将它添加到Xcode Frameworks部分时,我收到警告:ld: warning: in /path/to/app/libzmq.a, file was built for unsupported file format which is not the architecture being linked (armv7)并且发现很多符号错误.

如果我将当前活动架构从armv6更改为armv7,警告消息会将其更改为armv6.我究竟做错了什么 ?

谢谢,丹

iphone xcode compilation configure zeromq

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