|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 _2_ 于 2019-10-27 19:56 编辑
已经解决
本帖最后由 bin554385863 于 2019-10-28 19:16 编辑
VS插件:
Configur C Compiling
创建此扩展是为了自动创建launch.json、tasks.json文件和用于c项目的简单makefile。它还生成c_cpp_properties.json,其中包括windows中的mingw include路径。
特征
生成launch.json,使vscode能够启动c应用程序,并在tasks.json中生成编译源代码的任务。
此扩展名只有一个命令:生成配置并覆盖4个文件。
要求
您需要Windows中的MINW或其他叉和VSCode的C/C++扩展。
扩展设置
此扩展提供以下设置:
configure-c-compiling.mingw path:设置windows中mingw文件夹的完整路径
-----------------------------------------------------------------------------------------------------------------
我的json
必须设置了Windows的MinGW的环境变量
- {
- // 使用 IntelliSense 了解相关属性。
- // 悬停以查看现有属性的描述。
- // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations":
- [
- {
- "name": "g++.exe build and debug active file",
- "type": "cppdbg",
- "request": "launch",
- "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
- "args": [],
- "stopAtEntry": false,
- "cwd": "${workspaceFolder}",
- "environment": [],
- "externalConsole": false,
- "MIMode": "gdb",
- "miDebuggerPath": "E:\\My Program\\MinGW\\bin\\gdb.exe",//--------gdb的路径
- "setupCommands": [
- {
- "description": "Enable pretty-printing for gdb",
- "text": "-enable-pretty-printing",
- "ignoreFailures": true
- }
- ],
- "preLaunchTask": "g++.exe build active file"
- }
- ]
- }
复制代码
安装完插件以后删除所有的配置文件,
然后随便运行一个C代码;
让插件自己生成
|
|