インテル® Fortran コンパイラー 14.0 ユーザー・リファレンス・ガイド

ATTRIBUTES DLLEXPORT and DLLIMPORT

The ATTRIBUTES directive options DLLEXPORT and DLLIMPORT define a dynamic-link library's interface for processes that use them. The options can be assigned to module variables, COMMON blocks, and procedures. These directive options are available on Windows* and OS X* systems.

!DIR$ ATTRIBUTES DLLEXPORT :: object[, object] ...

!DIR$ ATTRIBUTES DLLIMPORT :: object[, object] ...

object

Is the name of a module variable, COMMON block, or procedure. The name of a COMMON block must be enclosed in slashes.

DLLEXPORT and DLLIMPORT define the interface for the following dynamic-link libraries:

DLLEXPORT specifies that procedures or data are being exported to other applications or dynamic libraries. This causes the compiler to produce efficient code; for example, eliminating the need on Windows OS for a module definition (.def) file to export symbols.

DLLEXPORT should be specified in the routine to which it applies.

Symbols defined in a DLL are imported by programs that use them. On Windows* OS, the program must link with the DLL import library (.lib).

The DLLIMPORT option is used inside the program unit that imports the symbol. DLLIMPORT is specified in a declaration, not a definition, since you cannot define a symbol you are importing.

関連情報


このヘルプトピックについてのフィードバックを送信