home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 May / Chip_2002-05_cd1.bin / chplus / cpp / 3 / Tools.exe / ilink32.txt < prev    next >
Text File  |  1998-02-09  |  6KB  |  119 lines

  1. ILink32 Help
  2.  
  3. TLINK32 and ILINK32 are the command-line tools that combine object modules (.OBJ files),
  4. library modules (.LIB files), and resources to produce executable files (.EXE and .DLL files).
  5. Because the compiler automatically calls a linker, you don't need to explicitly use a linker unless
  6. you suppress the linking stage of compiling (see the -c compiler option).
  7. TLINK32 and ILINK32 are invoked from the command line to link a configuration file called
  8. TLINK32.CFG (ILINK32 uses ILINK32.CFG), an optional response file, and command-line
  9. options to link object modules, libraries, and resources into an executable file.
  10.  
  11. Both TLINK32 and ILINK32 link 32-bit Windows code and use the 32-bit resource linker,
  12. RLINK32.DLL.
  13.  
  14. ILINK32 behaves just like TLINK32-it links object modules (.OBJ files), library modules (.LIB
  15. files), and resources to produce executable files (.EXE and .DLL files). The difference is that
  16. ILINK32 uses linker-state files to link previously linked images, resulting in much faster link
  17. cycles.
  18.  
  19. Differences between ILINK32 and TLINK32
  20.  
  21. Although both ILINK32 and TLINK32 link 32-bit executables, there are some differences
  22. between the two.
  23.  
  24. Linker-state files
  25.  
  26. When you first build a project, ILINK32 creates and stores project .OBJ and .LIB information in
  27. four read-only linker-state files. The next time you build or make your project, ILINK32 reads
  28. these files to reduce the time it takes to link your project.
  29. The four linker-state files have file names of <Project>.IL?, where <Project> is taken from the
  30. name of the project .MAK file, and the character in place of the question mark (?) identifies each
  31. of the four individual linker-state files.
  32.  
  33. By default, C++Builder automatically creates an initial set of linker-state files the first time you
  34. load it, and stores the files in your C++Builder Bin directory. If you need to regenerate the
  35. default linker-state files, pass the command-line option -deflink to C++Builder; C++Builder will
  36. then create the files when you load it.
  37.  
  38. Debug-information file
  39.  
  40. If you include debug information in your final linked executable, ILINK32 will always store the
  41. debug information in a separate .TDS file, named <Project>.TDS by default. Both the
  42. C++Builder integrated debugger and Turbo Debugger read these debugger-information files.
  43.  
  44. Linker switches
  45.  
  46. While ILINK32 does support most switches that TLINK32 supports, ILINK32 does not support
  47. the following linker switches:
  48.      /Enn Maximum errors
  49.      /Gx  Goodie switches
  50.      /n   Disables default libraries
  51.      /o   Import by ordinals
  52.      /P   Code packing
  53.      /r   Verbose line
  54. ILINK32 does support these non-TLINK32 switches:
  55.      /C   Erase all linker-state files before each link
  56.  
  57. /t   Display time spent on link
  58.  
  59. The linker syntax controls how the linkers work. Linker command-line options are
  60. case-sensitive. Unless specified, instructions and options for TLINK32 also apply to ILINK32.
  61. The linkers can also use a configuration file called TLINK32.CFG for options that you'd
  62. normally type at the command-line.
  63.  
  64. Syntax
  65.  
  66. TLINK32 | ILINK32 [@respfile][options] startup myobjs, [exe], [mapfile], [libraries], [deffile],
  67. [resfile]
  68.  
  69. [@respfile]    A response file is an ASCII file that lists linker options and file names that you
  70. would normally type at the command line. By placing options and files names in a response file,
  71. you can save the amount of keystrokes you need to type to link your application.
  72.  
  73. [options] Linker options that control how the linker works. For example, options specify
  74. whether to produce an .EXE or a DLL file. Linker options must be preceded by either a slash (/)
  75. or a hyphen (-).
  76.  
  77. startup   A Borland initialization module for executables or DLLs that arranges the order of the
  78. various segments of the program. Failure to link in the correct initialization module usually
  79. results in a long list of error messages telling you that certain identifiers are unresolved, or that
  80. no stack has been created.
  81.  
  82. myobjs    The .OBJ files you want linked. Specify the path if the files aren't in the current
  83. directory. (The linker appends an .OBJ extensions if no extension is present.)
  84.  
  85. [exe]     The name you want given to the executable file (.COM, .EXE, or .DLL). If you don't
  86. specify an executable file name, TLINK derives the name of the executable by appending .EXE
  87. or .DLL to the first object file name listed. (The linker assumes or appends an .EXE extensions
  88. for executable files if no extension is present. It also assumes or appends a .DLL extension for
  89. dynamic link libraries if no extension is present.)
  90.  
  91. [mapfile] Is the name you want given to the map file. If you don't specify a name, the map
  92. file name is given the same as exefile (but with the .MAP extension). (The linker appends a
  93. .MAP extensions if no extension is present.)
  94.  
  95. [libraries]    The library files you want included at link time. Do not use commas to separate
  96. the libraries listed. If a file is not in the current directory or the search path (see the /L option)
  97. then you must include the path in the link statement. (The linker appends a .LIB extension if no
  98. extension is present.)
  99.  
  100. The order in which you list the libraries is very important; be sure to use the order defined in this
  101. list:
  102.       Code Guard libraries (if needed)
  103.       List any of your own user libraries, noting that if a function is defined more than once,
  104. the linker uses the first definition encountered
  105.       If you're creating a DOS overlay, link the DOS overlay module OVERLAY.LIB
  106.       DPMI libraries (DOS DPMI applications only)
  107.       IMPORT.LIB (if you're creating an executable that uses the Windows API)
  108.  
  109.  Math libraries (if needed)
  110.       Runtime libraries associated with your memory model and platform
  111. [deffile] The module definition file for a Windows executable. If you don't specify a
  112. module definition (.DEF) file and you have used the /Twe or /Twd option, the linker creates an
  113. application based on default settings. (The linker appends a .DEF extension if no extension is
  114. present.)
  115.  
  116. [resfile] A list of .RES files (compiled resource files) to bind to the executable. (The linker
  117. appends an .RES extension if no extension is present.)
  118.  
  119. Copyright   1998 Borland International.