In order to use a function that resides in a library, it is su cient to declare the function as it exists in the library as an external function, with correct arguments and return type. The calling convention used by the function should be declared correctly as well. The compiler will then link the library as speci ed in the external statement to your program1 .
For example, to use the library as de ned above from a pascal program, you can use the following pascal program:
Listing: progex/psubs.pp
This program can be compiled without any additional command-switches, and should run just like that, provided the library is placed where the system can nd it. For example, on linux, this is /usr/lib or any directory listed in the /etc/ld.so.conf