FIX: MS-DOS APPEND Interacts with /Fo and /Fe

Last reviewed: September 16, 1997
Article ID: Q85475
5.10 6.00 6.00a 6.00ax 7.00 | 1.00
MS-DOS                      | WINDOWS
kbinterop kbfixlist kbbuglist

The information in this article applies to:

  • The Microsoft C/C++ Compiler (CL.EXE) included with:

        - Microsoft C for MS-DOS, versions 5.1, 6.0, 6.0a, and 6.0ax
        - Microsoft C/C++ for MS-DOS, version 7.0
        - Microsoft Visual C++ for Windows, version 1.0
    

SYMPTOMS

When the MS-DOS APPEND path is set, if an .OBJ or .EXE file does not exist in the current directory or in the directory specified with the /Fo or /Fe switch but does exist in a directory on the APPEND path, the new .OBJ or .EXE file will be placed in the directory on the APPEND path. This will occur regardless of how the path is specified with the /Fo or /Fe compiler switch.

CAUSE

APPEND is an MS-DOS terminate-and-stay-resident (TSR) program that searches for data files in directories other than the current directory. APPEND maintains its own list of directories to search for data files. When the compiler tries to open a file, APPEND causes the file on its path to be opened instead of the file in the current directory or in the directory specified with the /Fo or /Fe switch.

RESOLUTION

Placing a copy of the .OBJ or .EXE file in the directory specified by the /Fo or /Fe switch allows the compiler to update the appropriate file. Also, removing the .OBJ or .EXE file from the directory specified by the APPEND path allows the compiler to place the file in the directory specified by the /Fo or /Fe switch. Removing the APPEND TSR also resolves the problem.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ for Windows, version 1.5.

MORE INFORMATION

To reproduce this problem, follow these steps:

  1. Create two directories. In this example, the directories are called DIR1 and DIR2.

  2. Create a simple C program in DIR1. In this example, the C program is called HELLO.C.

  3. Compile HELLO.C and place the .OBJ file in DIR2:

          cl /c /Fo\dir2\hello.obj \dir1\hello.c
    

  4. Add DIR2 to the APPEND path:

          APPEND \dir2
    

  5. Compile HELLO.C and try to place the .OBJ file in DIR1:

          cl /c /Fo\dir1\hello.obj \dir1\hello.c
    

At this step the compiler updates the .OBJ file that is in DIR2 and no .OBJ file is created in DIR1.


Additional reference words: 5.10 6.00 6.00a 6.00ax 7.00 8.00 1.00
KBCategory: kbinterop kbfixlist kbbuglist
KBSubcategory: CLIss
Keywords : CLIss kb16bitonly kbbuglist kbfixlist kbinterop
Version : 5.10 6.00 6.00a 6.00ax 7.00 | 1.
Platform : MS-DOS WINDOWS
Solution Type : kbfix


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: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.