see sdccman, chapters 3.1.4 - 3.1.6. I recommend to use ar formatted libraries as described in chapter 3.1.6, since the sdcclib utility and
sdcclib formatted libraries might be obsoleted in the future.


On 12/06/2011 02:57 PM, Michal Hucik - ORDOZ wrote:


I would like to ask whether in the SDCC (specifically for the Z80), there is a possibility use in my projects also their own library functions, so that they are linked into the final code to dynamically only depending on whether they are used in the project.
( For example as the case with standard C library functions such as memcpy, strcpy, etc. defined in the file string.h )

Currently I solve this that so I have all the own library functions defined in one header file and own code of each function is stored in autonomous files that I must manually added as needed to the linker.

Is there any way how to solve this problem in the SDCC elegantly and dynamically?

Thank you for the answer.

Regards -
    Michal Hucik