Remark:The examples in this section assume a linux system; similar commands as the ones below exist for other operating systems, though.
You can also call a Free Pascal generated library from a C program:
Listing: progex/ctest.pp
provided the code is in ctest.c.
The library can also be loaded dynamically from C, as shown in the following example:
Listing: progex/ctest2.pp
The -ldl tells gcc that the program needs the libdl.so library to load dynamical libraries.