KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Article: Q58953
Product(s): See article
Version(s): 7.00   | 7.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | SR# S900215-30 | mspl13_basic
Last Modified: 1-MAR-1990

Page 612 of the "Microsoft BASIC 7.0: Programmer's Guide" correctly
states the following concerning the .LIB stub files (87.LIB,
NOTRNEMR.LIB, and NOTRNEMP.LIB):

   Stub files (including the .LIB files listed) are specified in the
   <objfiles> field of LINK. You must supply the /NOE
   (/NOEXTDICTIONARY) option when linking any of the stub files.

If you mistakenly link the 87.LIB, NOTRNEMR.LIB, or NOTRNEMP.LIB stub
file in the .LIB area instead of the .OBJ area of the LINK.EXE command
line, the stub file will be ignored, and no code is excluded from your
.EXE file.

This information applies to Microsoft BASIC Professional Development
System (PDS) Version 7.00 for MS-DOS and MS OS/2.

Example of Using 87.LIB Stub File
---------------------------------

To remove floating-point-coprocessor emulation code from a stand-alone
BASIC PDS 7.00 .EXE program, the 87.LIB file must be placed in the
.OBJ area in the LINK.EXE command line, as follows:

   BC test/O;
   LINK test+87.LIB /NOE;

The resulting .EXE program requires the presence of an 8087, 80287, or
80387 (80x87) numeric coprocessor.

87.LIB should be placed in the linker's objects (.OBJ) list, NOT in
the libraries (.LIB) list. If you mistakenly link the 87.LIB file in
the .LIB area of the LINK.EXE command line, 87.LIB is ignored, and no
code is excluded from your .EXE file. (The resulting .EXE program will
run on machines with or without a coprocessor.) Below is an example of
the WRONG way to link the 87.LIB stub file:

   LINK test,,,87.LIB /NOE;

This is wrong because the linker first searches the default BASIC
libraries for the references it needs and only then searches your
listed .LIB files for unresolved references (if any). For stub files
to work, they must appear in the .OBJ area of the LINK command line to
resolve routine references before the default library reference
search.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.