You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/clang-support-msbuild.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
description: "Learn more about: Clang/LLVM support in Visual Studio projects"
3
3
title: "Clang/LLVM support in Visual Studio projects"
4
-
ms.date: 02/05/2021
4
+
ms.date: 11/11/2021
5
5
ms.description: "Configure a Visual Studio MSBuild project to use the Clang/LLVM toolchain."
6
6
helpviewer_keywords: ["Clang support for C++ MSBuild projects"]
7
7
---
@@ -19,7 +19,7 @@ You can use Visual Studio 2019 version 16.2 and later with Clang to edit, build,
19
19
20
20
## Install
21
21
22
-
For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **C++ Clang-cl for v142 build tools.** optional component.
22
+
For best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing **C++ Clang tools for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose **C++ Clang-cl for v142 build tools**.
23
23
24
24
The Microsoft C++ Standard Library requires at least Clang 8.0.0.
25
25
@@ -31,11 +31,11 @@ Later versions of Visual Studio provide newer versions of the Clang toolset. The
31
31
32
32
To configure a Visual Studio project to use Clang, right-click on the project node in **Solution Explorer** and choose **Properties**. Typically, you should first choose **All configurations** at the top of the dialog. Then, under **General** > **Platform Toolset**, choose **LLVM (clang-cl)** and then **OK**.
33
33
34
-

34
+

35
35
36
36
If you're using the Clang tools that are bundled with Visual Studio, no extra steps are required. For Windows projects, Visual Studio by default invokes Clang in [clang-cl](https://llvm.org/devmtg/2014-04/PDFs/Talks/clang-cl.pdf) mode. It links with the Microsoft implementation of the Standard Library. By default, **clang-cl.exe** is located in *%VCINSTALLDIR%\\Tools\\Llvm\\bin\\* and *%VCINSTALLDIR%\\Tools\\Llvm\\x64\\bin\\*.
37
37
38
-
If you're using a custom Clang installation, you can either modify **Project** > **Properties** > **VC++ DIrectories** > **Configuration Properties** > **Executable Directories** by adding the custom Clang installation root as the first directory there, or change the value of the `LLVMInstallDir` property. For more information, see [Set a custom LLVM location](#custom_llvm_location).
38
+
If you're using a custom Clang installation, you can either modify **Project** > **Properties** > **VC++ Directories** > **Configuration Properties** > **Executable Directories** by adding the custom Clang installation root as the first directory there, or change the value of the `LLVMInstallDir` property. For more information, see [Set a custom LLVM location](#custom_llvm_location).
39
39
40
40
## Configure a Linux project to use Clang tools
41
41
@@ -45,7 +45,7 @@ To configure a Visual Studio Linux project to use Clang:
45
45
46
46
1. Right-click on the project node in **Solution Explorer** and choose **Properties**.
47
47
1. Typically, you should first choose **All configurations** at the top of the dialog.
48
-
1. Under **General** > **Platform Toolset**, choose **WSL_Clang_1_0** if you're using Windows Subsystem for Linux (WSL). Choose **Remote_Clang_1_0** if you're using a remote machine or VM.
48
+
1. Under **General** > **Platform Toolset**, choose **Clang for Windows Subsystem for Linux** if you're using Windows Subsystem for Linux (WSL). Choose **Clang for Remote Linux** if you're using a remote machine or VM.
49
49
1. Press **OK**.
50
50
51
51

Copy file name to clipboardExpand all lines: docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -186,9 +186,9 @@ Right now, this DLL doesn't do very much. Next, you'll create a header file to d
186
186
187
187
This header file declares some functions to produce a generalized Fibonacci sequence, given two initial values. A call to `fibonacci_init(1, 1)` generates the familiar Fibonacci number sequence.
188
188
189
-
Notice the preprocessor statements at the top of the file. The new project template for a DLL project adds **_PROJECTNAME__EXPORTS** to the defined preprocessor macros. In this example, Visual Studio defines **MATHLIBRARY_EXPORTS** when your MathLibrary DLL project is built.
189
+
Notice the preprocessor statements at the top of the file. The new project template for a DLL project adds `<PROJECTNAME>_EXPORTS` to the defined preprocessor macros. In this example, Visual Studio defines `MATHLIBRARY_EXPORTS` when your MathLibrary DLL project is built.
190
190
191
-
When the **MATHLIBRARY_EXPORTS** macro is defined, the **MATHLIBRARY_API** macro sets the `__declspec(dllexport)` modifier on the function declarations. This modifier tells the compiler and linker to export a function or variable from the DLL for use by other applications. When **MATHLIBRARY_EXPORTS** is undefined, for example, when the header file is included by a client application, **MATHLIBRARY_API** applies the `__declspec(dllimport)` modifier to the declarations. This modifier optimizes the import of the function or variable in an application. For more information, see [dllexport, dllimport](../cpp/dllexport-dllimport.md).
191
+
When the `MATHLIBRARY_EXPORTS` macro is defined, the `MATHLIBRARY_API` macro sets the `__declspec(dllexport)` modifier on the function declarations. This modifier tells the compiler and linker to export a function or variable from the DLL for use by other applications. When `MATHLIBRARY_EXPORTS` is undefined, for example, when the header file is included by a client application, `MATHLIBRARY_API` applies the `__declspec(dllimport)` modifier to the declarations. This modifier optimizes the import of the function or variable in an application. For more information, see [dllexport, dllimport](../cpp/dllexport-dllimport.md).
0 commit comments