vscode-cpptools出错:"cl.exe build and debug is only usable when VS Code is run from the Developer Comm
Error with vscode-cpptools: "cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS."
我使用的Visual Studio工具链带有VS Code的vscode cpptools扩展,并得到以下错误:
cl.exe构建和调试仅在从VS.的开发人员命令提示符运行VS代码时可用
错误的原因是什么?如何解决?
阅读有关为Microsoft C++配置VS代码的文档。
下面的摘录是在一张屏幕截图下找到的,该截图显示了您所遇到的确切错误。
如果在尝试使用cl.exe进行构建和调试时出错,请确保已使用
code .
快捷方式从Visual Studio的开发人员命令提示符启动VS代码。
Visual Studio Build Tools的每个版本都附带一个开发人员提示,用于设置使用该版本工具的环境。例如,它将目录放在其环境的PATH
中,以便可以轻松访问这些目录。使用Visual Studio构建工具的配置中的其他一些工具(如VS代码(可能期望从该环境中运行。
相关文章:
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- Visual Studio Code - C++ Debugger 無法啟動
- Visual Studio Code "undefined reference to `WinMain@16'"
- VS Code "command":"make"与终端窗口中的命令行"make"不同
- 使用VS Code和CMake Tools运行自定义命令
- Why is UINT32_MAX + 1 = 0?
- C++错误:"error: int aaa::bbb is protected within this context"
- 修改 VS Code 中的默认C++代码段
- 创建具有 new in 函数和"this is nullptr"异常的对象
- 使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误
- Is !NaN not a NaN?
- 如何配置Visual Studio Code以使用cygwin,cmake和gcc进行调试
- std::to_string - 'to_string' 不是 'std' 的成员 - Visual Studio Code 1.42.0
- VS Code C++:不准确的系统包括路径错误(wchar.h,boost/lambda/lambda.hpp)
- Directx 11 - CompileFromFile() is not compiling
- Centos7 g++ "to_string is not in a member of std"
- C++新手,想知道如何使用VS code 2019播放音频文件
- "Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
- 如何在Visual Studio Code中重命名我的a.exe文件?
- C++ Visual Studio Code 的设置不起作用