View Full Version : .dylibs and .a files

Feb 5, 2009, 06:10 PM
As far as I understand, .dylib files are dynamic libraries and .a files are static libraries.

Both have their headers in a separate place. Most 3rd party libraries come in the form of .dylib files, but there are some occasions where I have encountered both of them for one library, such as libpng when installed using Fink.

My question is this:

- What is the proper way to link your Xcode project against a .dylib or a .a file?
- In case the .a file has a .dylib file with the same name in the same installation directory, could it be that the .a file depends on the .dylib file?
- How can I make link my program against a .a or a .dylib file and then make it run on other machines apart from my own?

i am searching Apple's documentation, and I cannot find any relevant text. Please help!