Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking Libraries in Xcode

Tags:

c++

xcode

linker

People also ask

Where is linked frameworks and Libraries in Xcode?

If you're building for iOS, tvOS, or watchOS: On your application targets' “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk.

Where is Libraries in Xcode?

At the bottom of the left sidebar, in the “Filter” box, type “Libraries”. If, in the Project Navigator, you now see a yellow folder icon with the word “Libraries” next to it, then you have found the Libraries folder you are looking for.


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.