Placing .OBJ File in Program List Gives Unexpected Result

Last reviewed: July 17, 1997
Article ID: Q72792
1.00 1.10 | 1.00 1.10
MS-DOS    | OS/2
kbtool

The information in this article applies to:

  • Microsoft Programmer's Workbench for MS-DOS, versions 1.0 and 1.1
  • Microsoft Programmer's Workbench for OS/2, versions 1.0 and 1.1

When creating a program list for a project in the Programmer's WorkBench (PWB) version 1.0 or 1.1, including an .OBJ file as one of the modules in the list may give different results than expected. Due to the way NMAKE actually builds a project, if there are any default inference rules that can be used to build the .OBJ, NMAKE will execute the default commands.

For example, assume you have a project that requires an .OBJ called FILE1.OBJ. If, in the same directory, there is a newer source file with the same base name (FILE1) and the file extension is one of those included in the .SUFFIXES list (for example, FILE1.ASM, FILE1.BAS, FILE1.C, FILE1.CBL, FILE1.FOR, or FILE1.PAS), NMAKE will try to invoke the appropriate compiler or assembler to rebuild FILE1.OBJ.

To work around this situation, copy the .OBJ file in question to some directory where the default inference rules will not be invoked, such as the directory where you have your libraries. If this is unacceptable, you can choose NMAKE Options from the Options menu and specify the /R switch to NMAKE. This will turn off all default inference rules for the project.


Additional reference words: kbinf 1.00 1.10 PWBIss
KBCategory: kbtool
KBSubcategory: PWBIss
Keywords : kb16bitonly


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.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.