Visible to Intel only — GUID: GUID-10C8B95E-78EB-4373-81DB-6D5ABAC4431E
Visible to Intel only — GUID: GUID-10C8B95E-78EB-4373-81DB-6D5ABAC4431E
Use Fortran Dynamic-Link Library Projects
A dynamic-link library (.DLL) is a source-code library that is compiled and linked to a unit independently of the applications that use it. A DLL shares its code and data address space with a calling application. A DLL contains only subprograms, not main programs.
A DLL offers the organizational advantages of a static library, but with the advantage of a smaller executable file at the expense of a slightly more complex interface. Object code from a DLL is not included in your program's executable file, but is associated as needed in a dynamic manner while the program is executing. More than one program can access a DLL at a time.
When routines in a DLL are called, the routines are loaded into memory at runtime, as they are needed. This is most useful when several applications use a common group of routines. By storing these common routines in a DLL, you reduce the size of each application that calls the DLL. In addition, you can update the routines in the DLL without having to rebuild any of the applications that call the DLL.
With Intel® Fortran, you can use DLLs in two ways:
You can build a DLL with your own routines. In Visual Studio*, select Dynamic-link Library as your project type. From the command line, use the DLL option with the ifort command.
You can build applications with the runtime library stored in a separate DLL instead of in the main application file. In the integrated development environment, open a solution and do the following:
From the Project menu, select Properties to display the project properties dialog box.
Click the Fortran folder.
Select the Libraries category.
In the Runtime Library option, select an option ending with "DLL."
From the command line, use the libs compiler option with keyword dll to build applications with the runtime library stored in a separate DLL.