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:
- 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
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.
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.
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.
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.
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 : kb16bitonly kbCompiler kbbuglist kbfixlist
Version : 5.10 6.00 6.00a 6.00ax 7.00 | 1.
Platform : MS-DOS WINDOWS
Solution Type : kbfix
Last Reviewed: September 20, 1997