当前位置:网站首页>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
}
}
边栏推荐
- 使用Stace排除故障的5种简单方法
- Define menus using XML resource files
- Siggraph 2022 best technical paper award comes out! Chen Baoquan team of Peking University was nominated for honorary nomination
- 99% of users often make mistakes in power Bi cloud reports
- DevOps 的运营和商业利益指南
- LeetCode 535(C#)
- Flash build API service
- DNS series (I): why does the updated DNS record not take effect?
- Several best practices for managing VDI
- Function and usage of textswitch text switcher
猜你喜欢
Alertdialog create dialog
第3章业务功能开发(实现记住账号密码)
企业即时通讯软件是什么?它有哪些优势呢?
麒麟信安中标国网新一代调度项目!
Sator launched Web3 game "satorspace" and launched hoobi
《世界粮食安全和营养状况》报告发布:2021年全球饥饿人口增至8.28亿
Dateticket and timeticket, functions and usage of date and time selectors
serachview的功能和用法
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
Functions and usage of serachview
随机推荐
alertDialog創建对话框
LeetCode 535(C#)
Flash build API Service - generate API documents
深入浅出【机器学习之线性回归】
麒麟信安加入宁夏商用密码协会
第3章业务功能开发(实现记住账号密码)
LeetCode 515(C#)
[fan Tan] those stories that seem to be thinking of the company but are actually very selfish (I: building wheels)
【网络攻防原理与技术】第3章:网络侦察技术
【OKR目标管理】价值分析
Numberpick的功能和用法
How to implement safety practice in software development stage
The computer cannot add a domain, and the Ping domain name is displayed as the public IP. What is the problem? How to solve it?
With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore
[fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
LeetCode 648(C#)
Share the latest high-frequency Android interview questions, and take you to explore the Android event distribution mechanism
【TPM2.0原理及应用指南】 12、13、14章
麒麟信安携异构融合云金融信创解决方案亮相第十五届湖南地区金融科技交流会
Examen des lois et règlements sur la sécurité de l'information