PRB: Mixing Case of LINK Option Causes Error L1093 or D4002 (49871)



The information in this article applies to:

  • Microsoft C for MS-DOS
  • Microsoft C for OS/2
  • Microsoft Visual C++ for Windows, 16-bit edition 1.0
  • Microsoft Visual C++ for Windows, 16-bit edition 1.5
  • Microsoft Visual C++, 32-bit Editions 1.0
  • Microsoft Visual C++, 32-bit Editions 2.0
  • Microsoft Visual C++, 32-bit Editions 4.0
  • Microsoft Visual C++, 32-bit Editions 5.0
  • Microsoft Visual C++, 32-bit Editions 6.0

This article was previously published under Q49871

SYMPTOMS

When specifying linker options from the CL command line, the word "link" must be in all lowercase letters. If the word "link" is not all lowercase, the error that occurs is either:
Command line warning D4002 : ignoring unknown flag '-xxxx'

-or-

LINK : fatal error L1093: xxxx.OBJ : object not found
NOTE: xxxx is the four letters keyed in after the "/" (forward slash) or the "-" (hyphen).

RESOLUTION

Retype the command line, ensuring "link" is typed in all lowercase letters.

MORE INFORMATION

For example, issuing the following command from the MS-DOS, OS/2, or Windows NT command prompt
      cl myfile.c /Link mylib.lib
				
produces the following error:
Command line warning D4002 : ignoring unknown flag '-Link'

Modification Type:MinorLast Reviewed:7/5/2005
Keywords:kbCompiler kbprb KB49871