I'm trying to link third party libraries like fftw3 and sndfile to my iPhone project in Xcode3.2. I got it working in a regular Mac project by setting the "Header Search Path" to "/usr/local/include" and the "Other Linker Flags" to "-lfftw3 -lsndfile" under the project build configuration. However, it gave me "library not found for -lfftw3" with exit code 1 error message when I tried to build it in the iPhone project using the same settings.
Does apple not allow this on the iPhone? Is there a way to get around this?
You need to build your libraries as universal static libraries. The process varies from library to library but it generally goes something like this.
Step 1 is generally the trickiest since many libraries have different build procedures. It is usually done by setting the proper compiler flags to use the iphone sdk instead of the system wide compiler.