Linking Libraries in Xcode Linking Libraries in Xcode xcode xcode

Linking Libraries in Xcode


To link to a .a library like this in Xcode you need to:

  • Double-click on your target or application in Xcode to open the Info window

  • Switch to the "Build" tab

  • Add -lfftw3 to "Other Linker Flags" (under "Linking")

  • Add the path to your library to the "Library Search Paths" (under "Search Paths"). In your case this will be /usr/local/lib

We use FFTW (it's great by the way), this works for us!


Did you set these options for the target?

Under "Linking->Other Linker Flags" add: "-L/path/to/library -lfftw3 -lm"


warning in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libfftw3.a, file is not of required architecture

Maybe the binary format was different e.g. the library could be 32 bit while the application 64.