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.
LINK Command Line: Examples
                                             Up Contents Index Back
─────LINK Command Line: Examples────────────────────────────────────────────
 
     Example 1
 
          LINK FUN+TEXT+TABLE+CARE, , FUNLIST, XLIB.LIB;
 
     This command links the object files FUN.OBJ, TEXT.OBJ, TABLE.OBJ,
     and CARE.OBJ. By default, the executable file is named FUN.EXE.
     The map file is named FUNLIST.MAP. LINK searches for unresolved
     external references in the library XLIB.LIB and in the default
     libraries. It does not prompt for a .DEF file because a semicolon
     appears before the <deffile> field.
 
     Example 2
 
          LINK FUN, , ;
 
     This command produces a map file named FUN.MAP because a comma
     appears as a placeholder for <mapfile>.
 
     Example 3
 
          LINK FUN, ;
          LINK FUN;
 
     Neither of these command lines produces a map file because commas
     do not appear as placeholders for <mapfile>.
 
     Example 4
 
          LINK MAIN GETDATA PRINTIT, , MAIN;
 
     This command links the files MAIN.OBJ, GETDATA.OBJ, and
     PRINTIT.OBJ into an executable file named MAIN.EXE. A map file
     named MAIN.MAP is also produced.
 
     Example 5
 
          LINK GETDATA+PRINTIT, , , , MODDEF
 
     This command links GETDATA.OBJ and PRINTIT.OBJ into a DLL if
     MODDEF.DEF contains a LIBRARY statement. Otherwise, it links them
     into a segmented executable file for OS/2 or Windows. A map file
     named GETDATA.MAP is created.
                                    -♦-