mingw下载链接:MinGW-w64 - for 32 and 64 bit Windows - Browse Files at SourceForge.net
完成环境变量配置后,在vscode终端输入cmake时可能会报不能找到cl的问题,可能是vscode默认先找VS的编译器,为了指定其使用mingw的编译器,应该用下面的方式
cmake -G "MinGW Makefiles"
参考链接:http://www.noobyard.com/article/p-atgwyezg-he.html
https://blog.csdn.net/sinat_31608641/article/details/122149131