[英]how to build mp4v2 for iphone
I'm new to ios development, and I want to use the mp4v2 library. 我是ios开发的新手,我想使用mp4v2库。 I have successfully compiled for iphone simulator, i386, but am having trouble compiling for the iphone architecture. 我已成功编译为iphone模拟器,i386,但我在编译iphone架构时遇到问题。 Configuring/Make-ing for i386 was easy: 配置/制作i386非常简单:
./configure --disable-gch --enable-ub=i386
However, using armv6/7 as a tag didn't work 但是,使用armv6 / 7作为标签不起作用
./configure --disable-gch --enable-ub=armv6,armv7
While configuring worked, the make command led to the error below: 配置工作时,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
How do I compile for iphone? 我如何为iphone编译?
I guess that this error is caused by trying to find cross compiler from system root path /usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2
instead of from Developer document. 我想这个错误是由于尝试从系统根路径/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2
而不是从Developer文档中找到交叉编译器引起的。 A little stupid solution is create a symbolic link llvm-gcc-4.2
in system root path /usr
, pointing to the real path. 一个小愚蠢的解决方案是在系统根路径/usr
创建一个符号链接llvm-gcc-4.2
,指向真实路径。
I beleive you may need to verify your xcode-select(1) value so your path includes the new xcode release tree. 我相信您可能需要验证您的xcode-select(1)值,以便您的路径包含新的xcode发布树。 The tools should have been found under /Applications/xcode with the latest release. 应该在/ Applications / xcode下找到最新版本的工具。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.