views:

157

answers:

3

I'm trying to integrate the FFTW3 (a GNU FFT library written in C, http://www.fftw.org/) into an iPhone app. I downloaded the source code and I found there are hundreds of .h and .c files along with a lot of other files I can't recognize. I'm not a linux expert so I don't really understand how the .configure file and other similar files work. And since there is no such file as filename.xcodeproj, I need to set up the XCode project myself.

The thing I want to know is: How can I get the files in XCode and compile them without error? Any experience or tips?

+2  A: 

Note that if you include the GPL version of this library in your application, you will need to make the source code of your own application available under the GPL license. It appears that you can buy a license from MIT to incorporate this library within a non-free application.

If you are willing to wait for iPhone OS 4 for your application, you will be able to use the Accelerate framework (link is to Mac implementation, but much is the same with the iPhone). Within the vDSP portion of this framework are FFT operations. According to Apple, these beat the FFTW library by up to 5x on the iPhone.

Brad Larson
Looks like the Accelerate framework is better in this case. I'll take some time to learn it. Thanks for your answer.
backspacer
+1  A: 

I recommend you take a look at kissfft. It is much smaller than FFTW, has a BSD license, and is capable of performing fixed point FFTs (AFAIK, iphones lack floating point units).

Mark Borgerding
Actually, the iPhone has a vector floating point unit, so fixed point arithmetic does not have that great an advantage on the devices.
Brad Larson
A: 

I provided a script for compiling fftw3 into a static library for use in iOS projects here: fftw3 static library for iOS

Epskampie