Microsoft KB Archive/58021
COBOL 3.00 ADIS Support in .LIB Must Be in .OBJ Area of LINK
PSS ID Number: Q58021 Article last modified on 03-26-1990
3.00 3.00a MS-DOS
Summary: The support modules supplied with COBOL (ADIS.OBJ, ADISINIT.OBJ, ADISKEY.OBJ, IXSIO.OBJ, EXTERN.OBJ, and EXTERNL.OBJ) will not be statically LINKed into your .EXE program if you put them into a library (.LIB) file that is LINKed in the library (.LIB) area of the LINK command line. Instead, you must link such a .LIB file in the .OBJ area of the LINK command line if you want to statically link these support modules into your .EXE program. If you don’t do this, the support modules will be dynamically linked (at .EXE run time). This information applies to Microsoft COBOL Compiler Versions 3.00 and 3.00a for MS-DOS and MS OS/2.
More Information: The above support modules in a .LIB file in the .LIB area of the LINK command line are ignored because the main COBOL library first resolves any calls to these modules using the dynamic linking routines. As a result, the support modules in a .LIB file are ignored in the library area of the LINK command line, and the .EXE program defaults to using dynamic (run-time) linking of the support modules. It is convenient to put the support modules (ADIS.OBJ, ADISINIT.OBJ, ADISKEY.OBJ, IXSIO.OBJ, EXTERN.OBJ, and EXTERNL.OBJ) in a .LIB library, but the library must be specified on the .OBJ part of the LINK line to statically link in all the support routines. This serves as a link-time convenience, so you do not have to specify a long list of .OBJs on the LINK.EXE or LIB.EXE command line. The following LIB.EXE (Microsoft Library Manager) command makes a file named SUPPORT.LIB, which contains all the support modules listed: LIB support.lib+adis+adisinit+adiskey+ixsio+extern+externl; The following LINK.EXE command shows how to statically link to all the SUPPORT.LIB routines into TEST.EXE: LINK test.obj+support.lib;
Copyright Microsoft Corporation 1990.