当前位置:网站首页>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
}
}边栏推荐
- 99% of users often make mistakes in power Bi cloud reports
- Solid function learning
- 简单的loading动画
- 【TPM2.0原理及应用指南】 9、10、11章
- 目标管理【管理学之十四】
- L1-023 输出GPLT(Lua)
- actionBar 导航栏学习
- Mrs offline data analysis: process OBS data through Flink job
- User defined view essential knowledge, Android R & D post must ask 30+ advanced interview questions
- 【OKR目标管理】案例分析
猜你喜欢

【可信计算】第十三次课:TPM扩展授权与密钥管理

策略模式 - Unity

Lex & yacc of Pisa proxy SQL parsing
![[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial](/img/14/4e7ebfb1ed5b99f8377af9d17d2177.jpg)
[video / audio data processing] Shanghai daoning brings you elecard download, trial and tutorial

User defined view essential knowledge, Android R & D post must ask 30+ advanced interview questions

Numberpick的功能和用法

Create dialog style windows with popupwindow

麒麟信安中标国网新一代调度项目!

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

【信息安全法律法規】複習篇
随机推荐
本周小贴士#135:测试约定而不是实现
[fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
【OKR目标管理】案例分析
Alertdialog create dialog
【信息安全法律法规】复习篇
Notes on installing MySQL in centos7
Leetcode brush questions day49
【信息安全法律法規】複習篇
Dateticket and timeticket, functions and usage of date and time selectors
目标管理【管理学之十四】
Functions and usage of viewswitch
Function and usage of calendar view component
使用 xml资源文件定义菜单
[source code interpretation] | source code interpretation of livelistenerbus
本周小贴士#141:注意隐式转换到bool
DNS series (I): why does the updated DNS record not take effect?
DatePickerDialog and trimepickerdialog
With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore
【网络攻防原理与技术】第5章:拒绝服务攻击
Devops' operational and commercial benefits Guide