{"id":263464,"date":"2024-05-15T15:06:54","date_gmt":"2024-05-15T07:06:54","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/263464.html"},"modified":"2024-05-15T15:06:59","modified_gmt":"2024-05-15T07:06:59","slug":"%e6%80%8e%e4%b9%88%e5%9c%a8cursor%e4%b8%ad%e8%bf%90%e8%a1%8cc%e8%af%ad%e8%a8%80%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/263464.html","title":{"rendered":"\u600e\u4e48\u5728cursor\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27123817\/5490bd77-873d-4680-8f25-6553073840c6.webp\" alt=\"\u600e\u4e48\u5728cursor\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\" \/><\/p>\n<p><p>C\u8bed\u8a00\u4ee3\u7801\u901a\u5e38\u5728\u4e13\u7528\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u8005\u547d\u4ee4\u884c\u7f16\u8bd1\u5668\u4e2d\u7f16\u8bd1\u548c\u8fd0\u884c\u3002<strong>\u5728cursor\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801<\/strong>\uff0c\u9996\u5148\u9700\u8981\u7406\u89e3\u6240\u8bf4\u7684\u201ccursor\u201d\u4e00\u8bcd\u7684\u5177\u4f53\u542b\u4e49\u3002\u5047\u8bbe\u201ccursor\u201d\u5728\u8fd9\u91cc\u6307\u7684\u662f\u4e00\u4e2a\u4ee3\u7801\u7f16\u8f91\u5668\u6216\u7ec8\u7aef\u754c\u9762\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u786e\u4fdd\u4f60\u7684\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86C\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u5982GCC\u3002\u63a5\u4e0b\u6765\uff0c\u4f60\u53ef\u4ee5\u5728\u7f16\u8f91\u5668\u4e2d\u5199\u4e0bC\u8bed\u8a00\u4ee3\u7801\u3001\u4fdd\u5b58\u6587\u4ef6\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u7f16\u8bd1\u4ee3\u7801\u5e76\u6267\u884c\u751f\u6210\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001<strong>\u5b89\u88c5C\u8bed\u8a00\u7f16\u8bd1\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u754c\u9762\u6216\u8005\u547d\u4ee4\u884c\u7b26\uff08cursor\uff09\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u4e4b\u524d\uff0c\u4f60\u5fc5\u987b\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86C\u8bed\u8a00\u7f16\u8bd1\u5668\u3002\u5bf9\u4e8e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b89\u88c5\u7f16\u8bd1\u5668\u7684\u65b9\u6cd5\u4f1a\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5bf9\u4e8eWindows\u7cfb\u7edf\uff1a<\/strong><\/p>\n<p>\u4f60\u53ef\u80fd\u9700\u8981\u4e0b\u8f7d\u5e76\u5b89\u88c5MinGW\u6216\u8005Cygwin\u8fd9\u6837\u7684\u5de5\u5177\u96c6\uff0c\u5b83\u4eec\u5305\u542b\u4e86GCC\u7f16\u8bd1\u5668\u3002\u5b89\u88c5\u65f6\uff0c\u52a1\u5fc5\u786e\u4fdd\u5c06\u7f16\u8bd1\u5668\u7684\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u8fd9\u6837\u624d\u80fd\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u4f7f\u7528\u547d\u4ee4\u884c\u6765\u7f16\u8bd1\u4f60\u7684C\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5bf9\u4e8eLinux\u7cfb\u7edf\uff1a<\/strong><\/p>\n<p>\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u5df2\u7ecf\u9884\u88c5\u4e86GCC\u7f16\u8bd1\u5668\u3002\u5982\u679c\u6ca1\u6709\u7684\u8bdd\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7Linux\u7684\u5305\u7ba1\u7406\u5668\uff08\u5982\uff1a<code>apt<\/code>\u3001<code>yum<\/code>\u7b49\uff09\u6765\u5b89\u88c5GCC\u3002\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u5b89\u88c5\u547d\u4ee4\uff08\u4f8b\u5982\uff0c<code>sudo apt install gcc<\/code>\uff09\u5373\u53ef\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5bf9\u4e8emacOS\u7cfb\u7edf\uff1a<\/strong><\/p>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Xcode\uff0c\u5176\u81ea\u5e26\u82f9\u679c\u7248\u672c\u7684GCC\u7f16\u8bd1\u5668\u3002\u53e6\u4e00\u79cd\u9009\u62e9\u662f\u901a\u8fc7Homebrew\u5b89\u88c5GCC\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u4e00\u65e6\u7f16\u8bd1\u5668\u5b89\u88c5\u5b8c\u6210\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528<code>gcc --version<\/code>\u547d\u4ee4\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001<strong>\u7f16\u5199C\u8bed\u8a00\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4efb\u4f55\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u7f16\u5199\u597dC\u8bed\u8a00\u4ee3\u7801\u540e\uff0c\u4f60\u9700\u8981\u4fdd\u5b58\u6587\u4ef6\uff0c\u901a\u5e38\u4ee5<code>.c<\/code>\u4e3a\u6269\u5c55\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-c\">\/\/ hello.c<\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>int m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n() {<\/p>\n<p>    printf(&quot;Hello, World!\\n&quot;);<\/p>\n<p>    return 0;<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u662f\u4e00\u4e2a\u57fa\u672c\u7684C\u8bed\u8a00\u7a0b\u5e8f\uff0c\u5b83\u8f93\u51fa\u201cHello, World!\u201d\u5230\u7ec8\u7aef\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001<strong>\u7f16\u8bd1C\u8bed\u8a00\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff08cursor\uff09\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528C\u8bed\u8a00\u7f16\u8bd1\u5668\u6765\u7f16\u8bd1\u4f60\u7684\u4ee3\u7801\u3002\u5047\u8bbe\u4f60\u7684\u4ee3\u7801\u6587\u4ef6\u540d\u4e3a<code>hello.c<\/code>\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Windows\u7cfb\u7edf\uff1a<\/strong><\/li>\n<\/ul>\n<p><pre><code class=\"language-bash\">gcc hello.c -o hello<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u547d\u4ee4\u5c06\u7f16\u8bd1\u6e90\u4ee3\u7801\u6587\u4ef6<code>hello.c<\/code>\uff0c\u5e76\u751f\u6210\u4e00\u4e2a\u540d\u4e3a<code>hello.exe<\/code>\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Linux\u6216macOS\u7cfb\u7edf\uff1a<\/strong><\/li>\n<\/ul>\n<p><pre><code class=\"language-bash\">gcc hello.c -o hello<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u540c\u6837\u7684\u547d\u4ee4\u5c06\u751f\u6210\u4e00\u4e2a\u540d\u4e3a<code>hello<\/code>\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5728Linux\u548cmacOS\u4e2d\uff0c\u751f\u6210\u7684\u6587\u4ef6\u4e0d\u9700\u8981<code>.exe<\/code>\u6269\u5c55\u540d\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001<strong>\u8fd0\u884cC\u8bed\u8a00\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u4f60\u7684C\u4ee3\u7801\u88ab\u7f16\u8bd1\u6210\u4e86\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884c\u5b83\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Windows\u7cfb\u7edf\uff1a<\/strong><\/li>\n<\/ul>\n<p><pre><code class=\"language-bash\">.\/hello.exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216\u5982\u679c\u4f60\u5f53\u524d\u7684\u76ee\u5f55\u6ca1\u6709\u5305\u542b\u5728\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u8fd9\u6837\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">hello.exe<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ul>\n<li><strong>Linux\u6216macOS\u7cfb\u7edf\uff1a<\/strong><\/li>\n<\/ul>\n<p><pre><code class=\"language-bash\">.\/hello<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6267\u884c\u4ee5\u4e0a\u547d\u4ee4\u540e\uff0c\u7ec8\u7aef\u5e94\u663e\u793a\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001<strong>\u8c03\u8bd5C\u8bed\u8a00\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u53ef\u80fd\u4f1a\u9047\u5230\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u548c\u95ee\u9898\u3002\u53ef\u4ee5\u5728\u7f16\u8bd1\u65f6\u6dfb\u52a0\u8c03\u8bd5\u6807\u5fd7<code>-g<\/code>\u6765\u5e2e\u52a9\u8c03\u8bd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">gcc -g hello.c -o hello<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5141\u8bb8\u4f60\u4f7f\u7528\u50cf<code>gdb<\/code>\u8fd9\u6837\u7684\u8c03\u8bd5\u5668\u6765\u7ebf\u4e0b\u8c03\u8bd5\u4f60\u7684\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001<strong>\u4f18\u5316C\u8bed\u8a00\u4ee3\u7801\u6267\u884c<\/strong><\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u4f18\u5316\u6267\u884c\u901f\u5ea6\uff0c\u4f60\u53ef\u4ee5\u5728\u7f16\u8bd1\u65f6\u6dfb\u52a0\u4f18\u5316\u7ea7\u522b\u6807\u5fd7\uff0c\u5982<code>-O2<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">gcc -O2 hello.c -o hello<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u542f\u7528\u4e86\u4f18\u5316\u5668\uff0c\u901a\u8fc7\u6539\u8fdb\u4ee3\u7801\u6765\u589e\u52a0\u7a0b\u5e8f\u7684\u8fd0\u884c\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><p>\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u7684\u4e00\u822c\u6b65\u9aa4\u5c31\u662f\u8fd9\u6837\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5373\u4fbf\u7406\u89e3\u4e86\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u5b9e\u9645\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u8fd8\u4f1a\u9047\u5230\u5404\u79cd\u73af\u5883\u914d\u7f6e\u548c\u7f16\u7a0b\u95ee\u9898\uff0c\u800c\u8fd9\u901a\u5e38\u9700\u8981\u4e00\u8fb9\u5b9e\u8df5\u4e00\u8fb9\u5b66\u4e60\u89e3\u51b3\u95ee\u9898\u7684\u6280\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u5728cursor\uff08\u5149\u6807\uff09\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\uff1f<\/strong><\/p>\n<p>\u5f53\u4f60\u60f3\u5728\u5149\u6807\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u65f6\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86C\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u6bd4\u5982GCC\u7f16\u8bd1\u5668\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u4f60\u9700\u8981\u5148\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5408\u9002\u7684\u7f16\u8bd1\u5668\u3002<\/p>\n<\/li>\n<li>\n<p>\u5176\u6b21\uff0c\u627e\u5230\u4f60\u4fdd\u5b58C\u8bed\u8a00\u4ee3\u7801\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u5165\u5230\u8be5\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u6765\u5207\u6362\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528GCC\u7f16\u8bd1\u5668\u6765\u7f16\u8bd1\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165&quot; gcc yourfile.c -o output&quot;\uff0c\u5176\u4e2dyourfile.c\u662f\u4f60\u4fdd\u5b58\u7684C\u8bed\u8a00\u4ee3\u7801\u6587\u4ef6\uff0coutput\u662f\u4f60\u6307\u5b9a\u7684\u8f93\u51fa\u6587\u4ef6\u540d\u3002<\/p>\n<\/li>\n<li>\n<p>\u7136\u540e\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u4e2d\u7684&quot;.\/output&quot;\u547d\u4ee4\u6765\u6267\u884c\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u3002\u8fd9\u5c06\u5728\u5149\u6807\u4e2d\u8fd0\u884c\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u6b65\u9aa4\u5c06\u5e2e\u52a9\u4f60\u5728\u5149\u6807\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u3002\u8bb0\u4f4f\uff0c\u786e\u4fdd\u4f60\u7684\u4ee3\u7801\u6ca1\u6709\u9519\u8bef\uff0c\u5e76\u6309\u7167\u6b63\u786e\u7684\u8bed\u6cd5\u683c\u5f0f\u7f16\u5199\uff0c\u4ee5\u786e\u4fdd\u6210\u529f\u8fd0\u884c\u3002<\/p>\n<p><strong>2. \u600e\u6837\u5728\u5149\u6807\u4e2d\u987a\u5229\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\uff1f<\/strong><\/p>\n<p>\u60f3\u8981\u5728\u5149\u6807\u4e2d\u987a\u5229\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\uff0c\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\u662f\u5f88\u91cd\u8981\u7684\uff1a<\/p>\n<ul>\n<li>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86C\u8bed\u8a00\u7f16\u8bd1\u5668\u3002GCC\u7f16\u8bd1\u5668\u662f\u4e00\u4e2a\u5e38\u7528\u7684\u9009\u62e9\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165&quot;gcc -v&quot;\u6765\u68c0\u67e5\u662f\u5426\u5df2\u5b89\u88c5GCC\u3002<\/p>\n<\/li>\n<li>\n<p>\u5176\u6b21\uff0c\u786e\u8ba4\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\u7b26\u5408\u8bed\u6cd5\u89c4\u5219\uff0c\u5e76\u6ca1\u6709\u9519\u8bef\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u4ee3\u7801\u6587\u4ef6\uff0c\u4ed4\u7ec6\u68c0\u67e5\u4ee3\u7801\u7ed3\u6784\u3001\u53d8\u91cf\u58f0\u660e\u548c\u51fd\u6570\u5b9a\u4e49\uff0c\u4ee5\u786e\u4fdd\u6ca1\u6709\u62fc\u5199\u9519\u8bef\u6216\u7f3a\u5c11\u5206\u53f7\u7b49\u9519\u8bef\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u5165\u5230\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\u7684\u76ee\u5f55\u4e2d\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u6765\u5207\u6362\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p>\u7136\u540e\uff0c\u4f7f\u7528GCC\u7f16\u8bd1\u5668\u6765\u7f16\u8bd1C\u8bed\u8a00\u4ee3\u7801\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165&quot;gcc yourfile.c -o output&quot;\uff0c\u5176\u4e2dyourfile.c\u662f\u4f60\u7684\u4ee3\u7801\u6587\u4ef6\u540d\uff0coutput\u662f\u4f60\u60f3\u8981\u7684\u8f93\u51fa\u6587\u4ef6\u540d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6700\u540e\uff0c\u4f7f\u7528&quot;.\/output&quot;\u547d\u4ee4\u6765\u6267\u884c\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u3002\u8fd9\u5c06\u5728\u5149\u6807\u4e2d\u8fd0\u884c\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\uff0c\u5e76\u663e\u793a\u7ed3\u679c\u6216\u8f93\u51fa\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6709\u4e86\u4ee5\u4e0a\u6b65\u9aa4\u7684\u6307\u5bfc\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u987a\u5229\u5728\u5149\u6807\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u3002<\/p>\n<p><strong>3. C\u8bed\u8a00\u4ee3\u7801\u5982\u4f55\u5728\u5149\u6807\u4e2d\u8fd0\u884c\uff1f<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u60f3\u8981\u5728\u5149\u6807\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\n<p>\u9996\u5148\uff0c\u786e\u8ba4\u4f60\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86C\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u6bd4\u5982GCC\u7f16\u8bd1\u5668\u3002\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165&quot;gcc -v&quot;\u6765\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u3002<\/p>\n<\/li>\n<li>\n<p>\u5176\u6b21\uff0c\u627e\u5230\u4f60\u4fdd\u5b58C\u8bed\u8a00\u4ee3\u7801\u7684\u6587\u4ef6\uff0c\u5e76\u8fdb\u5165\u8be5\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u6765\u5207\u6362\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528GCC\u7f16\u8bd1\u5668\u6765\u7f16\u8bd1\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165&quot;gcc yourfile.c -o output&quot;\uff0c\u5176\u4e2dyourfile.c\u662f\u4f60\u4fdd\u5b58\u7684\u4ee3\u7801\u6587\u4ef6\uff0coutput\u662f\u4f60\u60f3\u8981\u7684\u8f93\u51fa\u6587\u4ef6\u540d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6700\u540e\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u4e2d\u7684&quot;.\/output&quot;\u547d\u4ee4\u6765\u6267\u884c\u4f60\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u3002\u8fd9\u5c06\u5728\u5149\u6807\u4e2d\u8fd0\u884c\u4f60\u7684C\u8bed\u8a00\u4ee3\u7801\uff0c\u5e76\u663e\u793a\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u786e\u4fdd\u6309\u7167\u4e0a\u8ff0\u6b65\u9aa4\u64cd\u4f5c\uff0c\u4f60\u5c31\u80fd\u591f\u5728\u5149\u6807\u4e2d\u6210\u529f\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\u3002\u5982\u679c\u9047\u5230\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u68c0\u67e5\u4ee3\u7801\u662f\u5426\u6b63\u786e\u5e76\u9075\u5faaC\u8bed\u8a00\u7684\u8bed\u6cd5\u89c4\u5219\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"C\u8bed\u8a00\u4ee3\u7801\u901a\u5e38\u5728\u4e13\u7528\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u8005\u547d\u4ee4\u884c\u7f16\u8bd1\u5668\u4e2d\u7f16\u8bd1\u548c\u8fd0\u884c\u3002\u5728cursor\u4e2d\u8fd0\u884cC\u8bed\u8a00\u4ee3\u7801\uff0c\u9996\u5148 [&hellip;]","protected":false},"author":3,"featured_media":263465,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/263464"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=263464"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/263464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/263465"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=263464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=263464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=263464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}