{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/sublime-compile-run-c/",
  "atlas": "https://www.pystone.net/?node=sublime-compile-run-c#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/sublime-compile-run-c.md",
  "context": "https://www.pystone.net/notes/sublime-compile-run-c.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:sublime-compile-run-c",
  "slug": "sublime-compile-run-c",
  "title": "sublime编译运行C程序",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "sublime编译运行C程序",
  "contentRole": "unspecified",
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "unspecified",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "63bdb959192886d88bac0d4b6a6e777f664efff4216ce3b0481bcb1b8535b64b",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "sublime编译运行C程序",
      "anchor": "sublime编译运行c程序",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#sublime%E7%BC%96%E8%AF%91%E8%BF%90%E8%A1%8Cc%E7%A8%8B%E5%BA%8F"
    },
    {
      "depth": 3,
      "text": "MinGW环境配置",
      "anchor": "mingw环境配置",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#mingw%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE"
    },
    {
      "depth": 3,
      "text": "Sublime设置",
      "anchor": "sublime设置",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#sublime%E8%AE%BE%E7%BD%AE"
    },
    {
      "depth": 4,
      "text": "基本的C语言编译",
      "anchor": "基本的c语言编译",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#%E5%9F%BA%E6%9C%AC%E7%9A%84c%E8%AF%AD%E8%A8%80%E7%BC%96%E8%AF%91"
    },
    {
      "depth": 4,
      "text": "CPP编译配置",
      "anchor": "cpp编译配置",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#cpp%E7%BC%96%E8%AF%91%E9%85%8D%E7%BD%AE"
    },
    {
      "depth": 3,
      "text": "一些问题",
      "anchor": "一些问题",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 3,
      "text": "Ref",
      "anchor": "ref",
      "citation": "https://www.pystone.net/notes/sublime-compile-run-c/#ref"
    }
  ],
  "claims": [],
  "outgoing": [],
  "incoming": [
    {
      "id": "note:programming-languages-and-runtimes",
      "title": "编程语言与运行时",
      "url": "https://www.pystone.net/notes/programming-languages-and-runtimes/",
      "atlas": "https://www.pystone.net/?node=programming-languages-and-runtimes#knowledge-atlas",
      "label": "编程语言与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "C++中的“sublime编译运行C程序”导航项",
      "citation": "https://www.pystone.net/notes/programming-languages-and-runtimes/#c"
    }
  ],
  "contentMarkdown": "# sublime编译运行C程序\n\n﻿# sublime编译运行C程序\n\n> 创建时间：2020/10/6 23:28\n\n### MinGW环境配置\n\n> MinGW64网盘下载\n>  链接：https://pan.baidu.com/s/15WXjNrMAQl2ffIfqMj3lqg\n>  提取码：uigv\n\n  * 变量名 变量值\n  * C_INCLUDEDE_PATH C:\\MinGW64\\include\n  * LIBRARY_PATH C:\\MinGW64\\lib\n  * Path C:\\MinGW64\\bin\n\n### Sublime设置\n\n#### 基本的C语言编译\n\nTools -> Build System -> New Build System\n配置内容：\n\n```cpp\nstring str1 = &quot;test&quot;;\nstring str2 = &quot;test&quot;;\n\n```\n\n保存配置文件名称为 `C.sublime-bulld`\n\nTools -> Build System -> C\n\n按Ctrl+Shfit+B按钮，选择“C - Run”\n\n#### CPP编译配置\n\n若MinGW中没有安装g++，则\n\n```cpp\nstring str1 = &quot;test&quot;;\nstring str2 = &quot;test&quot;;\n\n```\n\n说明:\n\n  * CPP ： 这个会编译当前文件，并弹出一个cmd命令框（运行这个程序）。\n  * CPP-Build-Only就是会只编译一下。\n  * CPP-Run-Only就是只运行一下。\n  * CPP-Pipe Build and Run 会在当前代码所在目录找，找到in文件（没有后缀）的内容作为输入，并且，输出给out文件（同样没有后缀）\n  * Pipe Run Only 跟上面的唯一区别，就是不会编译。就只输出而已\n  * Project Build & Run 就是将当前目录下的所有cpp文件，然后集合编译为一个文件，并且，输出为project.exe的文件，且执行该文件。\n  * Project Build Only，只编译，不运行。\n  * Project Run Only，只运行，不编译。\n\n### 一些问题\n\n解决不能编译for语句 （-std=c99）\n解决C语言输出中文是乱码 （-fexec-charset=gbk）\n\n### Ref\n\nhttps://zhuanlan.zhihu.com/p/215841527\nhttps://blog.csdn.net/a19990412/article/details/82658981\n"
}
