Question

i followed script on ( How do I link third party libraries like fftw3 and sndfile to an iPhone project in Xcode? ) but i got an Error. firstly by configuration :

./configure --host=arm-apple-darwin --target=arm-apple-darwin --enable-float --enable-neon .... checking whether C compiler accepts -march=armv7 -mfpu=neon... no configure: error: Need a compiler with support for -march=armv7 -mfpu=neon

and at the end by copying the ARM library to a temporary location :

lipo -arch armv7 $RESULT_DIR/libfftw3f_armv7.a -arch armv7s $RESULT_DIR/libfftw3f_armv7s.a -arch i386 $RESULT_DIR/libfftw3f_i386.a -arch x86_64 $RESULT_DIR/libfftw3f_x86_64.a -arch arm64 $RESULT_DIR/libfftw3f_arm64.a -create -output $RESULT_DIR/libfftw3f.a

lipo: unknown architecture specification flag: arm64 in specifying input file -arch arm64 ios-library/libfftw3f_arm64.a

lipo: known architecture flags are: any little big ppc64 x86_64 ppc970-64 ppc i386 m68k hppa sparc m88k i860 veo arm ppc601 ppc603 ppc603e ppc603ev ppc604 ppc604e ppc750 ppc7400 ppc7450 ppc970 i486 i486SX pentium i586 pentpro i686 pentIIm3 pentIIm5 pentium4 m68030 m68040 hppa7100LC veo1 veo2 veo3 veo4 armv4t armv5 xscale armv6 armv6m armv7 armv7f armv7s armv7k armv7m armv7em

lipo: Usage: lipo [input_file] ... [-arch input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank ] [-thin ] [-remove ] ... [-extract ] ... [-extract_family ] ... [-verify_arch ...] [-replace ] ...

i am using the gcc49 and Mac OS X 10.9.2, iOS 7.1. any idea ? thanks

Was it helpful?

Solution

by First Error, the configure should be like this:

./configure --host=arm-apple-darwin --target=arm-apple-darwin --enable-float

( without --enable-neon ) and the second Error, its because the libraries are all from the arch x86_64. they should have the right architecture ( libfftw3f_i386.a should have the arch. i386.a and libfftw3f_armv7s.a the arch. armv7s.a and so on )

i could make the right library for FFTW by using macports (or u can use homebrew) to install a universal build of the library for use with OpenFrameworks.

type this into a terminal window:

sudo port install fftw-3 +universal

the port install command will place the fftw3.h header file in your_HD/opt/local/include folder, and the libfftw3.a library in your_HD/opt/local/lib folder. To use the library in your OF project, add these two files to your project via the menu option Project -> Add to project...

thanks for every help and special thanks @Adam Freeman

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top