LINK Help (linkx.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Linking without an Import Library
                                             ◄Up► ◄Contents► ◄Index► ◄Back►
─────Linking without an Import Library──────────────────────────────────────
 
     The figure below illustrates how to create an application that
     uses a single DLL.
 
           ┌──────────┐ ┌─────────┐  ┌─────────┐ ┌──────────┐
           │ .OBJ and │ │.DEF file│  │.DEF file│ │ .OBJ and │
           │.LIB files│ │(LIBRARY)│  │(imports)│ │.LIB files│
           │          │ │(exports)│  │         │ │          │
           └────┬─────┘ └────┬────┘  └────┬────┘ └─────┬────┘
                └──────┬─────┘            └─────┬──────┘
                       ↓                        ↓
                    (1) LINK                 (2) LINK
                       ↓                        ↓
                  ┌────┴────┐             ┌─────┴───────┐
                  │.DLL file│             │ .EXE file   │
                  │(library)│             │(application)│
                  └─────────┘             └─────────────┘
 
     As depicted above, linking occurs in two steps:
 
       1. Object files (and standard libraries if any) are linked with
          a module-definition (.DEF) file to create a .DLL file. The
          .DEF file defines all functions exported by the .DLL file.
 
       2. Object files (and standard libraries if any) are linked with
          a .DEF file to create an application (.EXE) file. A different
          .DEF file is used for this step; it defines all dynamic-link
          functions imported and used by the application.
 
     See: ◄Module-Definition Files►
                                    -♦-