当前位置:网站首页>Vscode three configuration files about C language
Vscode three configuration files about C language
2022-07-07 17:38:00 【Larry Chow】
stay cmd.exe Enter the following command :
gcc -v -E -x c++ -

When used vscode Open folder , Automatically created .vscode Folder , In this folder , establish 3 Configuration files , Namely c_cpp_properties.json、launch.json、tasks.json.
Put the information in the red box in the configuration file , Replace .
stay c_cpp_properties.json in
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceRoot}",
"D:/programFiles/MinGW/include/**",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++/mingw32",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++/backward",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/../../../../include",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include-fixed"
],
"defines": [
"_DEBUG",
"UNICODE",
"__GNUC__=6",
"__cdecl=__attribute__((__cdecl__))"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "",
"path": [
"${workspaceRoot}",
"D:/programFiles/MinGW/include/**",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++/mingw32",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include/c++/backward",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/../../../../include",
"D:/programFiles/MinGW/bin/../lib/gcc/mingw32/6.3.0/include-fixed"
]
}
}
],
"version": 4
}stay launch.json in
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "cmd",
"preLaunchTask": "echo",
"args": [
"/C",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"&",
"echo.",
"&",
"pause"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole":true
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files\\mingw64\\bin\\gdb.exe",// My own computer gdb
"preLaunchTask": "echo",// Here and task.json Of label Corresponding
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}stay tasks.json in :
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "gcc",
"args": [
"-g",
"${file}",
"-o",
"${fileBasenameNoExtension}.exe",
"-fexec-charset=GBK"// Solve the Chinese garbled code
]
}
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}边栏推荐
- DatePickerDialog and trimepickerdialog
- Several best practices for managing VDI
- How to choose the appropriate automated testing tools?
- 【信息安全法律法规】复习篇
- 【网络攻防原理与技术】第1章:绪论
- Notification is the notification displayed in the status bar of the phone
- Rpcms method of obtaining articles under the specified classification
- Alertdialog create dialog
- The server is completely broken and cannot be repaired. How to use backup to restore it into a virtual machine without damage?
- L1-023 输出GPLT(Lua)
猜你喜欢

Numberpick的功能和用法

DatePickerDialog和trimepickerDialog

DevOps 的运营和商业利益指南

Functions and usage of imageswitch

百度地图自定义样式向右拖拽导致全球地图经度0度无法正常显示

【重新理解通信模型】Reactor 模式在 Redis 和 Kafka 中的应用

Examen des lois et règlements sur la sécurité de l'information

Functions and usage of viewswitch

Dateticket and timeticket, functions and usage of date and time selectors

Mrs offline data analysis: process OBS data through Flink job
随机推荐
How to mount the original data disk without damage after the reinstallation of proxmox ve?
textSwitch文本切换器的功能和用法
麒麟信安云平台全新升级!
Function and usage of calendar view component
Matplotlib绘图界面设置
Biped robot controlled by Arduino
【网络攻防原理与技术】第1章:绪论
Flash build API Service - generate API documents
Function and usage of numberpick
Audio device strategy audio device output and input selection is based on 7.0 code
本周小贴士#136:无序容器
[Huang ah code] Why do I suggest you choose go instead of PHP?
到底有多二(Lua)
calendarview日历视图组件的功能和用法
Leetcode brush questions day49
Mrs offline data analysis: process OBS data through Flink job
数字化转型的主要工作
【OKR目标管理】案例分析
PLC: automatically correct the data set noise, wash the data set | ICLR 2021 spotlight
User defined view essential knowledge, Android R & D post must ask 30+ advanced interview questions