LINK "Cannot Open Response File" Error with "@" in Path (73417)



The information in this article applies to:

  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
  • Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
  • Microsoft QuickBASIC 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBASIC 4.5
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b

This article was previously published under Q73417

SUMMARY

When you link a program from a directory having an "@" ("at" sign) in its name or with a file or library with an @ symbol in its path, the linker will give either a "Cannot Open Response File" or "Cannot Nest Response File" error message. The same error occurs when the file you are linking has an @ symbol in its name. This linker error correctly occurs because the linker assumes that the @ symbol means to use a response file.

To link successfully, you must remove @ characters from the filenames and directory names encountered by the LINK.EXE program.

MORE INFORMATION

Example 1

Any program, including a simple PRINT "HELLO" program, will cause this behavior.

If your current directory has an @ symbol in its name, and you try to compile and link a program from the QB.EXE or QBX.EXE environment, you will receive the message "Cannot Nest Response File". For example:
   c:\qb45\test@\ 
				
If you name the program TEST.BAS and try to compile and link it using the Make EXE File command from within the environment, you will get the following link error message:
"Run File [test.exe]: c:\bc71\test@link : fatal error L1021: Cannot nest response files"
If you compile and link from the DOS command line, the program compiles and links fine (as long as you don't fully qualify the path to TEST.EXE as done by the Make EXE File command in the QBX.EXE or QB.EXE environments).

Example 2

If in your LINK line from DOS you specify the path to a library in the library list and the path has an @ in it, you will get a "Cannot Open Response File" error message. For example:
   LINK TEST ,,, C:\BC71\TEST@\BCL71ENR.LIB;
				
"link : fatal error 1089: cannot open response file"

WORKAROUND

This problem is caused by having an @ symbol in the path and can be worked around by renaming the directory or placing the libraries in a directory with no @ symbol. The problem caused by having an @ symbol in the filename can be corrected by taking the @ symbol out of the filename.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB73417