Testing a Library
To test a library, create a program that uses the library. Include the appropriate header file in your source code. When compiling the code that calls a library function, provide the path to the header file using the
–Iswitch.
> sdscc –c –I –o main.o main.c
To link against a library, use the
–Land
–lswitches.
> sdscc –sds-pf zc702 ${OBJECTS} –L -lfir –o fir.elf
In the example above, the compiler uses the librarylibfir.alocated at