C/C++ Building Reference

Visual C++ provides two ways of building a C/C++ program. The easiest (and most common) way is to build within the Visual C++ development environment. The other way is to build from a command prompt using command-line tools. In either case, you can create your source files using the Visual C++ source editor or a third-party editor of your choice.

If your program uses a makefile rather than a .vcxproj file, you can still build it in the development environment as an external project.

In This Section

  • Compiling a C/C++ Program
    Describes the compiler, which creates an object file containing machine code, linker directives, sections, external references, and function/data names.

  • Linking
    Describes the linker, which combines code from the object files created by the compiler and from statically linked libraries, resolves the name references, and creates an executable file.

  • Release Builds
    Presents information on why and when you would want to change from a debug build to a release build and also discusses some of the problems you may encounter when changing from a debug to a release build.

  • Optimizing Your Code
    Provides links to topics discussing the mechanisms for optimizing code:

  • C/C++ Build Tools
    Provides the following command-line tools for viewing or manipulating build output:

  • C/C++ Build Errors
    Introduces the build errors section in the table of contents.

  • C/C++ Preprocessor Reference
    Discusses the preprocessor, which prepares source files for the compiler by translating macros, operators, and directives.

  • Understanding Custom Build Steps and Build Events
    Discusses customizing the build process.

  • Building a C/C++ Program
    Provides links to topics describing building your program from the command line or from the integrated development environment of Visual Studio.

  • Setting Compiler Options
    Describes setting compiler options in the development environment or on the command line.

  • Compiler Options
    Provides links to topics discussing using compiler options.

  • Setting Linker Options
    Describes setting linker options inside or outside the integrated development environment.

  • Linker Options
    Provides links to topics discussing using linker options.

  • BSCMAKE Reference
    Describes the Microsoft Browse Information Maintenance Utility (BSCMAKE.EXE), which builds a browse information file (.bsc) from .sbr files created during compilation.

  • LIB Reference
    Describes the Microsoft Library Manager (LIB.exe), which creates and manages a library of Common Object File Format (COFF) object files.

  • EDITBIN Reference
    Describes the Microsoft COFF Binary File Editor (EDITBIN.EXE), which modifies Common Object File Format (COFF) binary files.

  • DUMPBIN Reference
    Describes the Microsoft COFF Binary File Dumper (DUMPBIN.EXE), which displays information about Common Object File Format (COFF) binary files.

  • NMAKE Reference
    Describes the Microsoft Program Maintenance Utility (NMAKE.EXE), which is a tool that builds projects based on commands contained in a description file.