Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Compiler Options
 /c (Compile Without Linking)

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual C++ Compiler Options
/c (Compile Without Linking)

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.

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.

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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker