Specifying .DEF Files on the CL Command Line

ID Number: Q32448

5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a

MS-DOS | OS/2

Summary:

In Microsoft C versions 5.1, 6.0, 6.0a, 6.0ax, and C/C++ version 7.0,

files with .DEF, .LIB, and .OBJ extensions may be specified on the CL

command line.

These files may be specified on the command line and the CL driver

will pass the appropriate arguments to LINK.EXE when it is invoked. If

no extension is given for a file, the CL.EXE driver will assume that

the file is a .OBJ file and will try to link to it.

The following command builds a protected-mode program called MYAPP.EXE

by compiling MYAPP.C, then linking MYAPP.OBJ and MYSUB.OBJ with the

library MYLIB.LIB, and using the MYDEF.DEF.definitions file:

cl /Lp myapp.c mysub mylib.lib mydef.def

Additional reference words: 6.0 6.00 6.0a 6.00a 6.0ax 6.00ax 7.00