How to build mp4v2 for iphone

I am new to ios development and I want to use mp4v2 library. I successfully compiled for iphone simulator, i386, but I have compilation problem for iphone architecture. The configuration / build for the i386 was simple:

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

However, using armv6 / 7 as a tag did not work

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

When setting up the work, the make command resulted in the error below:

/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 to compile for iphone?

+5
source share
2 answers

I assume that this error is caused by an attempt to find a cross-compiler from the root path of the system /usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2instead of the developer document. A slightly stupid solution creates a symbolic link llvm-gcc-4.2in the root path of the system /usr, pointing to the real path.

+3

, xcode-select (1), xcode. /​​Applications/xcode .

-1

All Articles