title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-c (Compile Without Linking) | Microsoft Docs |
11/04/2016 |
|
article |
|
|
|
8017fc3d-e5dd-4668-a1f7-3120daa95d20 |
9 |
corob-msft |
corob |
ghogen |
Prevents the automatic call to LINK.
/c
Compiling with /c creates .obj files only. You must call LINK explicitly with the proper files and options to perform the linking phase of the build.
Any internal project created in the development environment uses the /c option by default.
- This option is not available from within the development environment.
- To set this compiler option programmatically, see xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.CompileOnly%2A.
The following command line creates the object files FIRST.obj and SECOND.obj. THIRD.obj is ignored.
CL /c FIRST.C SECOND.C THIRD.OBJ
To create an executable file, you must invoke LINK:
LINK firsti.obj second.obj third.obj /OUT:filename.exe