Udostępnij za pośrednictwem


Creating and Managing Visual C++ Projects

A project is the set of source code files, resources such as strings and images, and other related files that are compiled into a binary output such as a .appx, .exe or .dll file. The .vcxproj XML file contains all the information that is necessary to build the program, including which folders to search to include files and libraries, and which settings to apply to the compiler, linker, and (in a debug configuration) the debugger.

Visual Studio always creates a Solution file (.sln) when it creates a new project. Think of a solution file as a thin wrapper around any number of related projects. All the compilation and other build settings are at the project level.

You can create Visual C++ projects in several ways:

  • When starting from scratch, select File | New | Project and choose from the list of available project templates, such as the Win32 Project template or the CLR Console Application Template (C++). For some of the more complex project types, Visual Studio will present an application wizard that will walk you through various options before it creates the project.

  • To get existing files into a project is to select File | New | Create Project from Existing Code. This option invokes a wizard that walks you through the steps.

  • You can also get existing code into a project by using the Win32 Application Wizard. Just create an empty project and then add your code files by right-clicking on the project node in Solution Explorer and choosing Add | New Item. This method works well for simple applications.

Once you have created your project, you can add and remove files as needed in Solution Explorer, and set various project properties by using the Project Property Pages.

In This Section

  • Project Templates in Visual C++ Editions
    Provides an overview of which project templates are available in Visual C++ editions.

  • Managing Solutions, Projects, and Files
    Provides links to topics describing common tasks that you can perform when working with solutions and projects.

  • 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.

  • User Interface
    Provides links to topics describing adding a user interface to your program.

  • Visual C++ Programming Methodologies
    Provides links to topics describing conceptual information about the Visual C++ libraries and topics discussing various coding technologies and techniques.

  • Visual C++ Reference
    Provides links to topics describing the C and C++ language references, the libraries provided with Visual C++, the Visual C++ Extensibility Object Model, and the Microsoft Macro Assembler (MASM).

  • Visual C++ Samples
    Provides links to sample code showing the capabilities of Visual C++ and the libraries and technologies it supports.

See Also

Other Resources

Visual Studio SDK