Archived Forum Post

Index of archived forum posts

Question:

Smaller binary for individual products?

Oct 06 '17 at 10:22

I'm interested in integrating SFTP into my software but the static library trial for Objective-C/Cocoa is quite large for my use case (48MB). Is it possible to get a binary just for SFTP? And if so, how large is it? These are the header files I’m currently using:

CkoSFtp.h CkoSshKey.h CkoTask.h


Accepted Answer

When a program is compiled and linked against a static library, only the code that is directly or indirectly used by the application will get linked into the executable. Therefore, it makes no difference if separate libs are provided.

For example, if Chilkat added new functionality for XYZ that increased the size of the static libs by 6000MB, but your application does not use XYZ, then the code for XYZ does not get linked into your executable.

Also, just in case you don't realize it... you don't include the static libs with your application's install. There's no need for it because the code in the static libs is linked directly into your executable.