[next] [tail] [up]

### 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 file:

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 file 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 file, you must declare it, and tell the compiler where to find it. The following sections attempt to explain how to do this.

Declaring external functions or procedures
Declaring external variables
Declaring the calling convention modifier
Declaring the external object code
Linking to an object file
Linking to a library

[next] [front] [up]