objective-cxcodecocoastatic-librariesdynamic-library

What is better to use in a Cocoa application: dynamic libraries or static libraries?


I need to use a library in a Cocoa application and can use either a dynamic (.dynlib) or a static (.a) version of it. I came from Linux world and would happily use the dynlib. However, since the app bundle will contain all the dependencies (including the dynlib) I thought it would not be a problem to have a bigger binary due to the static linking. What is the best solution?


Solution

  • In this case, my concern would be responsiveness with respect to loading time of big executable vs. small executable and multiple libraries. The difference may be small.