Skip to content

Commit caee84b

Browse files
author
mikeblome
committed
updates to porting guide
1 parent 916f376 commit caee84b

10 files changed

+60
-74
lines changed

docs/build/reference/std-specify-language-standard-version.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The default **/std:c++14** option enables the set of C++14 features implemented
2828

2929
- [u8 character literals](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html)
3030

31-
For additional information on which C++14 and C++17 features are enabled when **/std:c++14** is specified, see the notes in [Visual C++ Language Conformance](../../overview/visual-cpp-language-conformance.md).
31+
For additional information on which C++14 and C++17 features are enabled when **/std:c++14** is specified, see the notes in [Microsoft C++ language conformance table](../../overview/visual-cpp-language-conformance.md).
3232

3333
The **/std:c++17** option enables the full set of C++17 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are changed or new in versions of the Working Draft and defect updates of the C++ Standard after C++17.
3434

@@ -42,7 +42,7 @@ The **/std** option in effect during a C++ compilation can be detected by use of
4242
The **/std:c++14** and **/std:c++latest** options are available beginning in Visual Studio 2015 Update 3. The **/std:c++17** option is available beginning in Visual Studio 2017 version 15.3. As noted above, some C++17 standard behavior is enabled by the **/std:c++14** option, but all other C++17 features are enabled by **/std:c++17**. C++20 features are enabled by **/std:latest** until the implementation is complete.
4343

4444
> [!NOTE]
45-
> Depending on the MSVC compiler version or update level, C++17 features may not be fully implemented or fully conformant when you specify the **/std:c++17** options. For an overview of C++ language conformance in Visual C++ by release version, see [Visual C++ Language Conformance](../../overview/visual-cpp-language-conformance.md).
45+
> Depending on the MSVC compiler version or update level, C++17 features may not be fully implemented or fully conformant when you specify the **/std:c++17** options. For an overview of C++ language conformance in Visual C++ by release version, see [Microsoft C++ language conformance table](../../overview/visual-cpp-language-conformance.md).
4646
4747
### To set this compiler option in the Visual Studio development environment
4848

docs/cpp/welcome-back-to-cpp-modern-cpp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ For more information, see the Stack Overflow article [Which C++ idioms are depre
126126
[C++ Language Reference](../cpp/cpp-language-reference.md)<br/>
127127
[Lambda Expressions](../cpp/lambda-expressions-in-cpp.md)<br/>
128128
[C++ Standard Library](../standard-library/cpp-standard-library-reference.md)<br/>
129-
[Visual C++ language conformance](../overview/visual-cpp-language-conformance.md)
129+
[Microsoft C++ language conformance table](../overview/visual-cpp-language-conformance.md)

docs/overview/cpp-conformance-improvements.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ struct Comparer {
804804
805805
## <a name="improvements_150"></a> Conformance improvements in Visual Studio 2017 RTW (version 15.0)
806806
807-
With support for generalized **constexpr** and non-static data member initialization (NSDMI) for aggregates, the Microsoft C++ compiler in Visual Studio 2017 is now complete for features added in the C++14 standard. However, the compiler still lacks a few features from the C++11 and C++98 standards. See [Visual C++ Language Conformance](../visual-cpp-language-conformance.md) for a table that shows the current state of the compiler.
807+
With support for generalized **constexpr** and non-static data member initialization (NSDMI) for aggregates, the Microsoft C++ compiler in Visual Studio 2017 is now complete for features added in the C++14 standard. However, the compiler still lacks a few features from the C++11 and C++98 standards. See [Microsoft C++ language conformance table](../visual-cpp-language-conformance.md) for a table that shows the current state of the compiler.
808808
809809
### C++11: Expression SFINAE support in more libraries
810810
@@ -2844,4 +2844,4 @@ For the complete list of conformance improvements up through Visual Studio 2015
28442844

28452845
## See also
28462846

2847-
[Visual C++ language conformance](../visual-cpp-language-conformance.md)
2847+
[Microsoft C++ language conformance table](../visual-cpp-language-conformance.md)

docs/overview/visual-cpp-in-visual-studio.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Find out what was new in C++ for each version of Visual Studio from 2003 through
3030
[C++ conformance improvements in Visual Studio](cpp-conformance-improvements.md)<br/>
3131
Learn about C++ conformance improvements in Visual Studio.
3232

33-
[Visual C++ language conformance](visual-cpp-language-conformance.md)<br/>
33+
[Microsoft C++ language conformance table](visual-cpp-language-conformance.md)<br/>
3434
A list of conformance status by feature in the MSVC C++ compiler.
3535

3636
[Visual C++ change history 2003 - 2015](../porting/visual-cpp-change-history-2003-2015.md)<br/>

docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,11 @@ For a complete list of standard library improvements in Visual Studio 2017 RTM,
354354
- Added \<optional\>, \<variant\>, `shared_ptr::weak_type`, and \<cstdalign\>.
355355
- Enabled C++14 `constexpr` in `min(initializer_list)`, `max(initializer_list)`, and `minmax(initializer_list)`, and `min_element()`, `max_element()`, and `minmax_element()`.
356356

357-
For more information, see [Visual C++ language conformance](../visual-cpp-language-conformance.md).
357+
For more information, see [Microsoft C++ language conformance table](../visual-cpp-language-conformance.md).
358358

359359
##### Visual Studio 2017 version 15.3
360360

361-
- Several additional C++17 features have been implemented. For more information, see [Visual C++ Language Conformance](cpp-conformance-improvements.md#improvements_153).
361+
- Several additional C++17 features have been implemented. For more information, see [Microsoft C++ language conformance table](cpp-conformance-improvements.md#improvements_153).
362362
- Implemented P0602R0 "variant and optional should propagate copy/move triviality".
363363
- The standard library now officially tolerates dynamic RTTI being disabled via the [/GR-](../build/reference/gr-enable-run-time-type-information.md) option. Both `dynamic_pointer_cast()` and `rethrow_if_nested()` inherently require `dynamic_cast`, so the standard library now marks them as `=delete` under **/GR-**.
364364
- Even when dynamic RTTI has been disabled via **/GR-**, "static RTTI" in the form of `typeid(SomeType)` is still available, and powers several standard library components. The standard library now supports disabling this feature too, via **/D\_HAS\_STATIC\_RTTI=0**. This flag also disables `std::any`, the `target()` and `target_type()` member functions of `std::function`, and the `get_deleter()` friend member function of `std::shared_ptr` and `std::weak_ptr`.
@@ -416,7 +416,7 @@ For more information, see [Visual C++ language conformance](../visual-cpp-langua
416416
- `constexpr char_traits`
417417
- Deduction guides for the standard library
418418

419-
For more information, see [Visual C++ language conformance](../visual-cpp-language-conformance.md).
419+
For more information, see [Microsoft C++ language conformance table](../visual-cpp-language-conformance.md).
420420

421421
### Performance and throughput fixes
422422

docs/porting/introduction-to-visual-cpp-for-unix-users.md

+18-32
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,44 @@
11
---
2-
title: "Introduction to Visual C++ for UNIX Users"
3-
ms.date: "09/01/2017"
2+
title: "Introduction to Microsoft C++ for UNIX Users"
3+
ms.date: "10/23/2019"
44
helpviewer_keywords: ["UNIX [C++]"]
55
ms.assetid: 36108b31-e7fa-49a8-a1f7-7077fcbec873
66
---
7-
# Introduction to Visual C++ for UNIX Users
7+
# Introduction to Microsoft C++ for UNIX Users
88

9-
This topic provides information for UNIX users who are new to Visual Studio and want to become productive with C++ and the Visual Studio Integrated Development Environment (IDE).
9+
This topic provides information for users of all flavors of UNIX who are new to Visual Studio and want to become productive with C++ either from the command line or by using Visual Studio. You can use Visual Studio with the Microsoft C++ compiler to target Windows. You can also use the Visual Studio IDE with GCC or Clang in UNIX environments such as remote Linux machines, MinGW-w64, and Windows Subsystem for Linux. To use C++ in Visual Studio, the **Desktop Development with C++** workload must be installed. Open the Visual Studio Installer to install the workload or add or remove optional components. Also install the **Linux Development with C++** workload if you'll be targeting a remote Linux machine. For Android or iOS development, install the **Mobile Development with C++** workload.
1010

11-
## Getting Started on the Command Line
11+
## Getting started on the command line
1212

13-
You can use the C++ compiler from the command line in a similar way that you would use a UNIX command-line environment. You compile from the command prompt by using the command-line C and C++ compiler (CL.EXE), linker (LINK.EXE), and other tools, including NMAKE.EXE, the Microsoft version of the UNIX make utility.
13+
You can use the Microsoft C++ compiler from the command line in a similar way that you would use a UNIX command-line environment. You compile from the command prompt by using the command-line C and C++ compiler (CL.EXE), linker (LINK.EXE), and other tools, including NMAKE.EXE, the Microsoft version of the UNIX make utility.
1414

15-
In UNIX, commands are installed in a common folder, such as /usr/bin. In Visual Studio, the command-line tools are installed in your Visual Studio installation directory in the VC\bin subdirectory and its subdirectories. Unlike UNIX, these tools are not available in a plain command prompt window. To use the command-line tools, use a developer command prompt shortcut, or run a developer command file such as vcvarsall.bat. This sets up the path and other environment variables that are necessary to compile C++ programs from the command line. For more information, see [Build C/C++ code on the command line](../build/building-on-the-command-line.md) and [Walkthrough: Compiling a Native C++ Program on the Command Line](../build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md).
15+
In UNIX, commands are installed in a common folder, such as /usr/bin. In Visual Studio, the command-line tools are installed in your Visual Studio installation directory in the VC\bin subdirectory and its subdirectories. Unlike UNIX, these tools are not available in a plain command prompt window. To use the command-line tools, you must use a special developer command prompt that sets up the path and other environment variables that are necessary to compile C++ programs. For more information, see [Build C/C++ code on the command line](../build/building-on-the-command-line.md) and [Walkthrough: Compiling a Native C++ Program on the Command Line](../build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md).
1616

17-
To open a developer command prompt shortcut, enter *developer command prompt* in the desktop search control and choose the **Developer Command Prompt** result for your version of Visual Studio. To choose a developer command prompt that is preconfigured for a particular host and target architecture, open the **Start** menu (the Windows icon in the corner of the desktop) and then scroll to the folder for your version of Visual Studio, such as **Visual Studio 2017**. Open the folder and choose the command prompt shortcut for your preferred host and target architecture.
17+
## Debugging your code
1818

19-
To take advantage of more powerful features, such as the Visual Studio debugger, IntelliSense code look-up and statement completion, visual designers, project management, and so on, you need to use the Visual Studio IDE.
19+
You can use the Visual Studio debugger for Microsoft C++ projects from the command line, or from within the IDE. Compile with the [/Z7, /Zi, /ZI (Debug Information Format)](../build/reference/z7-zi-zi-debug-information-format.md) switch to enable stepping through sources. For more information, see [Debugging Native Code](/visualstudio/debugger/debugging-native-code) and [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md).
2020

21-
## Debugging Your Code
21+
For programs compiled with GCC or Clang, Visual Studio invokes GDB, LLDB, or whatever custom debugger you specify.
2222

23-
If you use the command line and run your applications on your development workstation, you will see that a dialog box to run the Visual Studio debugger is displayed when your code encounters a memory access violation, unhandled exception, or other unrecoverable errors. If you click **OK**, then the Visual Studio development environment is started, and the debugger will open to the point of failure. It is possible to debug your applications this way, and, in this case, your source code would only be available if you compiled with the [/Z7, /Zi, /ZI (Debug Information Format)](../build/reference/z7-zi-zi-debug-information-format.md) switch. For more information, see [Debugging Native Code](/visualstudio/debugger/debugging-native-code) and [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md).
23+
## Visual Studio project system
2424

25-
## Using the Development Environment
25+
The Visual Studio project system is called MSBuild. It uses project files in XML format; C++ project files have the extension .vcxproj. An application that consists of multiple libraries and executables, each potentially built with a different set of compiler options or even in a different language, are stored in multiple projects that are part of a single *solution*. A solution is an abstraction for a container to group multiple projects together. Information about solutions is stored in a solution file with the extension .sln. For more information, see [Solutions and Projects in Visual Studio](/visualstudio/ide/solutions-and-projects-in-visual-studio) and [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md). From the main menu, choose **File** > **New** > **Project** to see the available Visual Studio project templates.
2626

27-
It is easier to use the development environment to edit and build your source code in a *project*. A project is a collection of source and related files that will be compiled into a single unit, such as a library or executable. A project also contains information on how the files are to be built. Information about projects is stored in a project file with the extension .prj.
27+
Starting in Visual Studio 2017, support for CMake projects is added, as well as options for using the Microsoft C++ compiler with any arbitrary build system, or with a loose folder of source files and no project files. For more information, see [CMake projects in Visual Studio](../build/cmake-projects-in-visual-studio.md) and [Open Folder projects in Visual Studio](../build/open-folder-projects.md).
2828

29-
An application that consists of multiple libraries and executables, each potentially built with a different set of compiler options or even in a different language, are stored in multiple projects that are part of a single *solution*. A solution is an abstraction for a container to group multiple projects together. Information about solutions is stored in a solution file with the extension .sln. For more information, see [Solutions and Projects in Visual Studio](/visualstudio/ide/solutions-and-projects-in-visual-studio) and [Using the Visual Studio IDE for C++ Desktop Development](../ide/using-the-visual-studio-ide-for-cpp-desktop-development.md).
30-
31-
## Importing Your Existing Code
32-
33-
You can use the C++ compiler to build existing code that is set up to compile with or without a makefile and put it into a Visual Studio project. For more information, see [How to: Create a C++ Project from Existing Code](../build/how-to-create-a-cpp-project-from-existing-code.md).
34-
35-
## Creating a New Project
36-
37-
You can create new projects in the development environment. Visual Studio provides numerous templates that provide standard code for various common projects. You can use application wizards to generate projects with code outlines for various application types.
38-
39-
You can start with an empty project by using the **Console Application (Win32) Wizard**. Select the **Empty Project** check box. You can then add new and existing files to the project later.
40-
41-
When you create a project, you must name the project. By default, the project name equals the name of the dynamic-link library (DLL) or executable that is build from the project. For more information, see [Creating Solutions and Projects](/visualstudio/ide/creating-solutions-and-projects).
42-
43-
## Microsoft-Specific Modifiers
29+
## Microsoft-specific modifiers
4430

4531
The Microsoft C++ compiler implements several extensions to the standard C++ programming language to support programming for Windows operating systems. These extensions are used to specify storage class attributes, function calling conventions, and based addressing, among other things. For a complete list of all supported C++ extensions, see [Microsoft-Specific Modifiers](../cpp/microsoft-specific-modifiers.md).
4632

47-
You can disable all Microsoft-specific extensions to C++ by using the `/Za` compiler option. This option is recommended if you want to write code to run on multiple platforms. For more information on the `/Za` compiler option, see [/Za, /Ze (Disable Language Extensions)](../build/reference/za-ze-disable-language-extensions.md). For more information on C++ compiler conformance, see [Visual C++ Language Conformance](../overview/visual-cpp-language-conformance.md) and [Nonstandard Behavior](../cpp/nonstandard-behavior.md).
33+
You can disable all Microsoft-specific extensions to C++ by using the `/Za` compiler option. This option is recommended if you want to write code to run on multiple platforms. For more information on the `/Za` compiler option, see [/Za, /Ze (Disable Language Extensions)](../build/reference/za-ze-disable-language-extensions.md). For more information on C++ compiler conformance, see [Microsoft C++ language conformance table](../overview/visual-cpp-language-conformance.md) and [Nonstandard Behavior](../cpp/nonstandard-behavior.md).
4834

49-
## Precompiled Headers
35+
## Precompiled headers
5036

5137
The Microsoft C and C++ compilers provide options for precompiling any C or C++ code, including inline code. Using this performance feature, you can compile a stable body of code, store the compiled state of the code in a file, and, during subsequent compilations, combine the precompiled code with code that is still under development. Each subsequent compilation is faster because the stable code does not need to be recompiled.
5238

53-
By default, all precompiled code is specified in the files *pch.h* and *pch.cpp* (*stdafx.h* and *stdafx.cpp* in Visual Studio 2017 and earlier). The **New Project** wizard will automatically create these files for you unless you deselect the **Precompiled header** option. For more information on precompiled headers, see [Creating Precompiled Header Files](../build/creating-precompiled-header-files.md).
39+
By default, all precompiled code is specified in the files *pch.h* and *pch.cpp* (*stdafx.h* and *stdafx.cpp* in Visual Studio 2017 and earlier). For more information on precompiled headers, see [Creating Precompiled Header Files](../build/creating-precompiled-header-files.md).
5440

55-
## Related Sections
41+
## Related sections
5642

5743
For more information, see [Porting from UNIX to Win32](../porting/porting-from-unix-to-win32.md).
5844

0 commit comments

Comments
 (0)