Archived Forum Post

Index of archived forum posts

Question:

Chilkat libs large for embedded arm-7-board

Dec 01 '14 at 09:59

Our test-environment is ubuntu 14.04, but our target will an embedded arm-7-board.

So I have another question: The sizes of your (test?) libs are big. I cannot use 9 MB for just one lib on an embedded board..

can we reduce the size of the files be using only the needed packages instead of the bundle ?


Answer

When a C/C++ linker links your program with a static library (.a), it will only include the library functions that are directly or indirectly referenced. Therefore, the size of the .a makes no difference because even if I provided a smaller .a, it could only be smaller by the code that wouldn't have been linked into your executable anyway.

If your resultant .exe (after linking) is still too large, then unfortunately there's nothing I can do. Chilkat is already as careful as possible to avoid creating cross-linkages within the internal code so that the size is minimized as much as possible (but it's still rather large). (One reason Chilkat has started supporting embedded systems is with the belief that the capacity of embedded systems will greatly grow in the future, whereas the size of Chilkat will not grow at the same rate. In other words, as time progresses, the size of Chilkat will be less and less of an issue. I realize that at this current time the size presses on acceptable limits and can preclude it from being chosen as a solution.)