简体   繁体   English

有什么方法可以在 Visual Studio 2022 中更改智能感知模式

[英]Is there any way to change intellisense mode in visual studio 2022

It seems CppProperties.json will only work for Open Folder project,似乎CppProperties.json仅适用于 Open Folder 项目,

I want to do this because I must use clang as the compiler, but intellisense doesn't work properly when working in clang mode, it work as expected under msvc mode.我想这样做是因为我必须使用 clang 作为编译器,但是智能感知在 clang 模式下工作时无法正常工作,它在 msvc 模式下按预期工作。

By the way, it doesn't work because I'm using boost.顺便说一句,它不起作用,因为我正在使用 boost。

is it possible to change the intellisense mode for normal msbuild C++ project?是否可以更改普通 msbuild C++ 项目的智能感知模式?

You can refer to the following steps to configure a Windows project to use Clang tools:您可以参考以下步骤来配置 Windows 项目以使用 Clang 工具:

  1. Right-click on the project node in Solution Explorer and choose Properties.在解决方案资源管理器中右键单击项目节点并选择属性。
  2. Choose All configurations at the top of the dialog.选择对话框顶部的所有配置。 Then, under General > Platform Toolset, choose LLVM (clang-cl).然后,在 General > Platform Toolset 下,选择 LLVM (clang-cl)。 在此处输入图像描述
  3. After you have set up a Clang configuration, right-click again on the project node and choose Reload project.设置 Clang 配置后,再次右键单击项目节点并选择重新加载项目。
  4. Visual Studio will provide IntelliSense when it detects that you are using the Clang compiler. Visual Studio 将在检测到您正在使用 Clang 编译器时提供 IntelliSense。

For more information you can see this link .有关更多信息,您可以查看此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM