/c (Compile Without Linking)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

/c (Compile Without Linking)

Prevents the automatic call to LINK.


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.

To set this compiler option in the Visual Studio development environment

  • This option is not available from within the development environment.

To set this compiler option programmatically

  • To set this compiler option programmatically, see CompileOnly.

The following command line creates the object files FIRST.obj and SECOND.obj. THIRD.obj is ignored.


To create an executable file, you must invoke LINK:

LINK firsti.obj second.obj third.obj /OUT:filename.exe
© 2016 Microsoft