中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

發布時間:2020-09-28 17:43:03 來源:腳本之家 閱讀:167 作者:張俊浩 欄目:編程語言

我看了網上的大佬們配的我是在是看不懂啊?我是一個小白啊?這太難了,這阻擋不了我,想使用這很騷的IDE,于是在不斷的摸索下,終于配置成功,小白們也不用慌,這次非常簡單。一定可以的。

1.下載 VS Code

下載網址:https://code.visualstudio.com/

2.運行安裝程序

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

一定不要忘記把Path那一條點上。

3.裝MinGW

當時我下了半天找不到,這次我放個地址,github放不下這么大的文件,傳文件夾的話還得ssh啥的,還不會,將就一下https://www.jb51.net/softs/438773.html

下載完了直接放到C盤根目錄下,沒多大,只有600M,這樣的話,就不用改我配置的路徑什么的了!

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

這樣就完事了,然后是配置環境變量。

4.環境變量

會配的直接跳過即可

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

找到這兩個path,用戶和系統變量。

點擊新建,然后輸入 C:\MinGW\bin

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

這樣環境變量就配置完了

檢查 win+R cmd 輸入 gcc -v

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

這樣就配完了

5.倒數第二步

下載地址,解壓出來 https://github.com/DuYuren/MinGW/tree/vscode

建個文件夾隨便什么名字

把我的 .vscode 放里面

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

6.最后一步

Windows10配置VSCode C++環境(超詳細,面向小白以及大佬們)

然后在剛才那個文件夾里寫個C++文件,就可以編譯了,F5呦。

如果純粹是來找json文件的
大佬們改改位置就能用

c_cpp_properties.json

{
  "configurations": [
    {
      "name": "Win32",
      "includePath": [
        "${workspaceFolder}/**",
        "C:/MinGW/include/*"
      ],
      "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
      ],
      "compilerPath": "C:/MinGW/bin/gcc.exe",
      "cStandard": "c11",
      "cppStandard": "c++17",
      "intelliSenseMode": "gcc-x64"
    }
  ],
  "version": 4
}

launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "(gdb) Launch",
      "type": "cppdbg",
      "request": "launch",
      "targetArchitecture": "x86",
      "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
      "miDebuggerPath": "c:\\MinGW\\bin\\gdb.exe",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${fileDirname}",
      "externalConsole": true,
      "preLaunchTask": "g++"
    }
  ]
}

settings.json

{
  "files.associations": {
    "vector": "cpp",
    "random": "cpp",
    "iostream": "cpp",
    "array": "cpp",
    "atomic": "cpp",
    "*.tcc": "cpp",
    "bitset": "cpp",
    "cctype": "cpp",
    "cfenv": "cpp",
    "charconv": "cpp",
    "chrono": "cpp",
    "cinttypes": "cpp",
    "clocale": "cpp",
    "cmath": "cpp",
    "codecvt": "cpp",
    "complex": "cpp",
    "condition_variable": "cpp",
    "csetjmp": "cpp",
    "csignal": "cpp",
    "cstdarg": "cpp",
    "cstddef": "cpp",
    "cstdint": "cpp",
    "cstdio": "cpp",
    "cstdlib": "cpp",
    "cstring": "cpp",
    "ctime": "cpp",
    "cuchar": "cpp",
    "cwchar": "cpp",
    "cwctype": "cpp",
    "deque": "cpp",
    "forward_list": "cpp",
    "list": "cpp",
    "unordered_map": "cpp",
    "unordered_set": "cpp",
    "exception": "cpp",
    "algorithm": "cpp",
    "functional": "cpp",
    "iterator": "cpp",
    "map": "cpp",
    "memory": "cpp",
    "memory_resource": "cpp",
    "numeric": "cpp",
    "optional": "cpp",
    "ratio": "cpp",
    "regex": "cpp",
    "set": "cpp",
    "string": "cpp",
    "string_view": "cpp",
    "system_error": "cpp",
    "tuple": "cpp",
    "type_traits": "cpp",
    "utility": "cpp",
    "fstream": "cpp",
    "future": "cpp",
    "initializer_list": "cpp",
    "iomanip": "cpp",
    "iosfwd": "cpp",
    "istream": "cpp",
    "limits": "cpp",
    "mutex": "cpp",
    "new": "cpp",
    "ostream": "cpp",
    "scoped_allocator": "cpp",
    "shared_mutex": "cpp",
    "sstream": "cpp",
    "stdexcept": "cpp",
    "streambuf": "cpp",
    "thread": "cpp",
    "typeindex": "cpp",
    "typeinfo": "cpp",
    "valarray": "cpp"
  },
  "editor.fontFamily": "Consolas, 'Fira code', monospace",
  "C_Cpp.errorSquiggles": "Disabled"
}

tasks.json

{
 "version": "2.0.0",
 "command": "g++",
 "type": "shell",
 "presentation": {
  "echo": true,
  "reveal": "always",
  "focus": false,
  "panel": "shared",
  "showReuseMessage": true,
  "clear": false
 },
 "args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"],
 "problemMatcher": {
  "owner": "cpp",
  "fileLocation": ["relative", "${workspaceRoot}"],
  "pattern": {
   "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
   "file": 1,
   "line": 2,
   "column": 3,
   "severity": 4,
   "message": 5
  }
 }
}

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持億速云。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

灯塔市| 河津市| 句容市| 光山县| 青神县| 西畴县| 诸城市| 上虞市| 陕西省| 夹江县| 遂昌县| 都兰县| 吴江市| 桂林市| 科技| 福安市| 洱源县| 遂昌县| 桃源县| 赞皇县| 卓资县| 胶南市| 镇平县| 罗定市| 罗源县| 闽清县| 新河县| 体育| 陇西县| 洪江市| 浮梁县| 和龙市| 东丽区| 青川县| 闻喜县| 晋州市| 梧州市| 扎赉特旗| 龙里县| 延寿县| 广南县|