Creating and Using DLLs
A dynamic-link library is a collection of source and object code and is similar in many ways to a static library. The differences between the two libraries are:
The DLL is associated with a main project during execution, not during linking. Unlike a static library where routines are included in the base executable image during linking, the routines in a DLL are loaded when an application that references that DLL is loaded (run time).
A dynamic-link library (DLL) contains one or more subprogram procedures (functions or subroutines) that are compiled, linked, and stored separately from the applications using them. Because the functions or subroutines are separate from the applications using them, they can be shared or replaced easily.
Other advantages of DLLs include:
You can change the functions in a DLL without recompiling or relinking the applications that use them, as long as the functions' arguments and return types do not change.
This allows you to upgrade your applications easily. For example, a display driver DLL can be modified to support a display that was not available when your application was created.
When general functions are placed in DLLs, the applications that share the DLLs can have smaller executables.
Multiple applications can access the same DLL. This reduces the overall amount of memory needed in the system, which results in fewer memory swaps to disk and improves performance.
Common blocks or module data placed in a DLL can be shared across multiple processes.
To build a DLL in the integrated development environment, specify the Fortran Dynamic-Link Library project type. On the command line, specify the /dll option.
You cannot make a QuickWin application into a DLL (see Using QuickWin Overview) and QuickWin applications cannot be used with Fortran run-time routines in a DLL.