这个人很勤快,什么都留下了。|

TuSalcc

园龄:3年2个月粉丝:4关注:2

VSCode配置

c_cpp_properties.json

{
"configurations": [
	{
		"name": "windows-gcc-x64",
		"includePath": [
			"${workspaceFolder}/**"
		],
		"defines": [
			"_DEBUG",
			"UNICODE",
			"_UNICODE"
		],
		// "windowsSdkVersion": "10.0.19041.0",
		"compilerPath": "D:/TDM-GCC-64/bin/g++.exe", // 此处双引号内的 D:/TDM-GCC-64 改为刚才安装编译器的路径,后面的 /bin/g++.exe 不动
		"cStandard": "c11",
		"cppStandard": "c++14",
		"intelliSenseMode": "${default}",
		"compilerArgs": []
	}
],
"version": 4
}

launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) 启动",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "D:/TDM-GCC-64/bin/gdb.exe",
            "setupCommands": [
                {
                    "description": "为 gdb 启用整齐打印",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "将反汇编风格设置为 Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe 生成活动文件"
        }
    ]
}

settings.json

{
    "files.associations": {
        "cstdio": "cpp",
        "queue": "cpp",
        "climits": "cpp"
    }
}

tasks.json

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "cppbuild",
			"label": "C/C++: g++.exe 生成活动文件",
			"command": "D:\\TDM-GCC-64\\bin\\g++.exe",
			"args": [
				"-fdiagnostics-color=always",
				"-g",
				"${file}",
				"-o",
				"${fileDirname}/${fileBasenameNoExtension}.exe",
				"-std=c++14"
			],
			"options": {
				"cwd": "${fileDirname}"
			},
			"problemMatcher": [
				"$gcc"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"detail": "编译器: D:\\TDM-GCC-64\\bin\\g++.exe"
		}
	]
}

本文作者:TuSalcc

本文链接:https://www.cnblogs.com/TS357051/p/17078004.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   TuSalcc  阅读(34)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起