7.1 Using external code and variables

In general, there are 3 things you must do to use a function that resides in an external library or object le:
  1. You must make a pascal declaration of the function or procedure you want to use.
  2. You must declare the correct calling convention to use.
  3. You must tell the compiler where the function resides, i.e. in what object le or what library, so the compiler can link the necessary code in.

The same holds for variables. To access a variable that resides in an external object le, you must declare it, and tell the compiler where to nd it. The following sections attempt to explain how to do this.


  7.1.1 Declaring external functions or procedures
  7.1.2 Declaring external variables
  7.1.3 Declaring the calling convention modier
  7.1.4 Declaring the external object code
    Linking to an object le
    Linking to a library