c++ - 如何使用 mingw 使 g++ 命令在 VSCode 中工作
问题描述
我正在尝试设置 Visual Studio Code 以使用 C++ 和 Mingw。我正在使用教程https://code.visualstudio.com/docs/cpp/config-mingw。当我按照教程中所述使用 ctrl+shift+b 构建 helloworld.cpp 时,我收到错误消息:
> Executing task: g++ -g -o helloworld helloworld.cpp <
g++ : The term 'g++' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name
, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ g++ -g -o helloworld helloworld.cpp
+ ~~~
+ CategoryInfo : ObjectNotFound: (g++:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
问题可能出在哪里?我是否错误地配置了 bash?
解决方案
推荐阅读
- arrays - 使用 qsort 对结构数组进行排序
- r - R中逻辑回归的交叉验证函数中成本函数的参数
- python - 如何进行新型惰性格式化 python 日志记录
- pyomo - 为 nlp 求解器使用 ipopt 时为 mintpy 设置最大迭代
- javascript - 材质 UI 评级组件未显示正确的值
- html - CSS border-top 从上到下渐变
- node.js - execSync 和 ffmpeg 执行差距
- sql-server - 尝试通过 DAO 记录集更新记录时出现运行时错误 3197
- python - 将 conv2D 分类器添加到 BERT
- .net - .Net Apache Ignite Memory cgroup 内存不足