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 –I
switch.
> sdscc –c –I<path to header> –o main.o main.cTo link against a library, use the –L and
–l
switches.
> sdscc –sds-pf zc702 ${OBJECTS} –L<path to library> -lfir –o
fir.elfIn the example above, the compiler uses the library libfir.a located at <path to library>.