iphone - 如何为 iphone 构建 mp4v2

标签 iphone ios compiler-errors cross-compiling

我是 ios 开发的新手,我想使用 mp4v2 库。我已经成功地为 iphone 模拟器 i386 进行了编译,但是在为 iphone 架构进行编译时遇到了问题。为 i386 配置/制作很容易:

./configure --disable-gch --enable-ub=i386

但是,使用armv6/7作为标签没有用

./configure --disable-gch --enable-ub=armv6,armv7

虽然配置有效,但 make 命令导致以下错误:

/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H   -arch i386 -arch armv6 -arch armv7 -I./include -I./include -I. -I.  -Wall -Wformat -g -O2 -fvisibility=hidden -c -o src/3gp.lo src/3gp.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -arch i386 -arch armv6 -arch armv7 -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/3gp.cpp  -fno-common -DPIC -o src/.libs/3gp.o
llvm-g++-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2': execvp: No such file or directory
llvm-g++-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/b6/vmqqncd55k79nb1nc4x30nwr0000gn/T//cctU2lnr.out
make: *** [src/3gp.lo] Error 1

如何为 iphone 编译?

最佳答案

我猜这个错误是由于试图从系统根路径/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2中寻找交叉编译器引起的 而不是来自开发人员文档。 一个有点愚蠢的解决方案是在系统根路径 /usr 中创建一个符号链接(symbolic link) llvm-gcc-4.2,指向真实路径。

关于iphone - 如何为 iphone 构建 mp4v2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10768798/

相关文章:

iphone - 解析 JSON 并更改我的模型而不阻塞 UI

ios - UITextfield 在 UIPageViewController (Swift) 中快速显示和关闭

iphone - UITableViewCell 中的 MKMapView

ios - 如何从模态视图 Controller 传递参数?

Swift 1.2 将 [AnyObject?] 转换为 [AnyObject]

c# - Visual Studio 2013 的 XAML 错误

iphone - 在显示启动图像时从 API 检索数据

iphone - 使用 CGContextRef 绘图

iphone - 联系后尝试隐藏节点

java - Maven 无法构建具有多个源目录的项目