CL Command Line Options Must Precede Source File NameID: Q92499
|
The syntax of the Microsoft C/C++ compiler CL command is as follows:
cl [option] file ... [option | file]... [lib] [/link link-opt]
If an option specification is placed on the command line incorrectly,
no error message may be generated or an incorrect error message may be
generated. This usually occurs if an option is placed after the file
name. In some cases, an incorrect object file or executable file may
be generated.
Two examples are listed below. There are many combinations of commands that may produce other symptoms.
cl hello.c /Zi
the program compiles without error. However, if the program is
debugged with the CodeView debugger, no source code is available.
However, CodeView does not give a CV0101 warning message to indicate
that no CodeView information is available because the CL command
processor passes the /CO (CodeView) option to the linker. The
resulting executable file contains some CodeView information.
cl /Zi hello.c
If an application is built without the /Zi switch, CodeView issues the
following warning message when it loads the application:
CV0101 Warning: no CodeView information for 'hello.exe'
cl hello.c /AL
the compiler performs some work and then issues the following message:
The D2002 error occurs because the compiler compiles HELLO.C for the small memory model (the default) and then attempts to compile a second source module with the large memory model. A HELLO.OBJ file is generated and its code is in the small memory model. The linker is not called because D2002 is a fatal error.Command line error D2002 : conflict in memory-model specification
Additional query words: kbinf 7.00 8.00 8.00c 1.00 1.50
Keywords : kb16bitonly
Version :
Platform :
Issue type :
Last Reviewed: July 29, 1999