Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
1
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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.