{"id":20671,"date":"2024-11-19T16:51:21","date_gmt":"2024-11-19T08:51:21","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20671\/"},"modified":"2024-11-19T16:51:21","modified_gmt":"2024-11-19T08:51:21","slug":"sublime-test%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8cc%e8%af%ad%e8%a8%80-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20671\/","title":{"rendered":"sublime test\u600e\u4e48\u8fd0\u884cc++\u8bed\u8a00"},"content":{"rendered":"<p>c++kquote&gt;\u5728 sublime text \u4e2d\u8fd0\u884c c++ \u7a0b\u5e8f\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 mingw \u6216 clang \u7f16\u8bd1\u5668\u8bbe\u7f6e\u76f8\u5e94\u7684\u6784\u5efa\u7cfb\u7edf\u7f16\u5199\u5e76\u4fdd\u5b58\u5e26\u6709 &#8220;.cpp&#8221; \u6269\u5c55\u540d\u7684 c++ \u4ee3\u7801\u6309 ctrl + b \u6216 cmd + b \u6784\u5efa\u7a0b\u5e8f\u6309 ctrl + f5 \u6216 cmd + f5 \u8fd0\u884c\u7a0b\u5e8f <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040312002358391.jpg\" class=\"aligncenter\" title=\"sublime test\u600e\u4e48\u8fd0\u884cc++\u8bed\u8a00\u63d2\u56fe\" alt=\"sublime test\u600e\u4e48\u8fd0\u884cc++\u8bed\u8a00\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Sublime Text \u4e2d\u8fd0\u884c C++ \u8bed\u8a00<\/strong><\/p>\n<p><strong>\u8fd0\u884c C++ \u7a0b\u5e8f\u7684\u6b65\u9aa4<\/strong><\/p>\n<p>\u5728 Sublime Text \u4e2d\u8fd0\u884c C++ \u7a0b\u5e8f\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li> <strong>\u5b89\u88c5\u7f16\u8bd1\u5668\uff1a<\/strong>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e2a C++ \u7f16\u8bd1\u5668\u3002\u63a8\u8350\u4f7f\u7528 MinGW \u6216 Clang\u3002<\/li>\n<li> <strong>\u8bbe\u7f6e\u6784\u5efa\u7cfb\u7edf\uff1a<\/strong>\u63a5\u4e0b\u6765\uff0c\u9700\u8981\u4e3a Sublime Text \u8bbe\u7f6e\u4e00\u4e2a\u6784\u5efa\u7cfb\u7edf\u3002\u8fd9\u5c06\u544a\u8bc9 Sublime Text \u5982\u4f55\u7f16\u8bd1\u548c\u8fd0\u884c\u7a0b\u5e8f\u3002<strong>\u5de5\u5177 -&gt; \u6784\u5efa\u7cfb\u7edf -&gt; \u65b0\u5efa\u6784\u5efa\u7cfb\u7edf&#8230;<\/strong>\uff0c\u7136\u540e\u9009\u62e9\u76f8\u5e94\u7684\u7f16\u8bd1\u5668\u3002<\/li>\n<li> <strong>\u7f16\u5199\u548c\u4fdd\u5b58\u4ee3\u7801\uff1a<\/strong>\u5728 Sublime Text \u4e2d\uff0c\u7f16\u5199\u5e76\u4fdd\u5b58\u60a8\u7684 C++ \u4ee3\u7801\u3002\u4f7f\u7528\u6269\u5c55\u540d\u4e3a &#8220;.cpp&#8221; \u7684\u6587\u4ef6\u3002<\/li>\n<li> <strong>\u6784\u5efa\u7a0b\u5e8f\uff1a<\/strong>\u6309 <strong>Ctrl + B<\/strong> (Windows\/Linux) \u6216 <strong>Cmd + B<\/strong> (Mac) \u6784\u5efa\u7a0b\u5e8f\u3002\u8fd9\u5c06\u7f16\u8bd1\u4ee3\u7801\u5e76\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<li> <strong>\u8fd0\u884c\u7a0b\u5e8f\uff1a<\/strong>\u6309 <strong>Ctrl + F5<\/strong> (Windows\/Linux) \u6216 <strong>Cmd + F5<\/strong> (Mac) \u8fd0\u884c\u7a0b\u5e8f\u3002\u8fd9\u5c06\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u7a97\u53e3\uff0c\u5e76\u5728\u5176\u4e2d\u8fd0\u884c\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><strong>\u8be6\u7ec6\u8bf4\u660e<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\n<p><strong>\u7f16\u8bd1\u5668\u5b89\u88c5\uff1a<\/strong><\/p>\n<ul>\n<li>MinGW\uff1ahttps:\/\/sourceforge.net\/projects\/mingw-w64\/<\/li>\n<li>Clang\uff1ahttps:\/\/clang.llvm.org\/<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u6784\u5efa\u7cfb\u7edf\u8bbe\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>\n<p>MinGW\uff1a`json<br \/> {<br \/> &#8220;cmd&#8221;: [&#8220;g++&#8221;, &#8220;-std=c++17&#8221;, &#8220;${file}&#8221;],<br \/> &#8220;file_regex&#8221;: &#8220;^(..<sup><\/sup><em>):([0-9]+):?([0-9]+)?:? (.<\/em>)$&#8221;,<br \/> &#8220;selector&#8221;: &#8220;source.cpp&#8221;<br \/> }<\/p>\n<\/li>\n<li>\n<p>Clang\uff1a<\/p>\n<pre>{\n\"cmd\": [\"clang++\", \"-std=c++17\", \"${file}\"],\n\"file_regex\": \"^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$\",\n\"selector\": \"source.cpp\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u7f16\u5199\uff1a<\/strong><\/p>\n<pre>#include &lt;iostream&gt;\n\nint main() {\n    std::cout &lt;&lt; \"Hello, world!\" &lt;&lt; std::endl;\n    return 0;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<pre>* **\u6784\u5efa\u548c\u8fd0\u884c\uff1a**\n* **Ctrl + B** \/ **Cmd + B**\uff08\u6784\u5efa\uff09<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<hr>\n<ol>\n<li>:  <\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662folor:#f60; text-decoration:underline;&#8217; href=&#8221;https:\/\/www.php.cn\/zt\/15777.html&#8221; target=&#8221;_blank&#8221;&gt;sublime test\u600e\u4e48\u8fd0\u884cc++\u8bed\u8a00\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>c++kquote&gt;\u5728 sublime text \u4e2d\u8fd0\u884c c++ \u7a0b\u5e8f\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5 mingw \u6216 clang \u7f16\u8bd1\u5668\u8bbe\u7f6e\u76f8\u5e94\u7684\u6784\u5efa\u7cfb\u7edf\u7f16\u5199\u5e76\u4fdd\u5b58\u5e26\u6709 &#8220;.cpp&#8221; \u6269\u5c55\u540d\u7684 c++ \u4ee3\u7801\u6309 ctrl + b \u6216 cmd + b \u6784\u5efa\u7a0b\u5e8f\u6309 ctrl + f5 \u6216 cmd + f5 \u8fd0\u884c\u7a0b\u5e8f \u5982\u4f55\u5728 Sublime Text \u4e2d\u8fd0\u884c C++ \u8bed\u8a00 \u8fd0\u884c C++ \u7a0b\u5e8f\u7684\u6b65\u9aa4 \u5728 Sublime Text \u4e2d\u8fd0\u884c C++ \u7a0b\u5e8f\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u5b89\u88c5\u7f16\u8bd1\u5668\uff1a\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e2a C++ \u7f16\u8bd1\u5668\u3002\u63a8\u8350\u4f7f\u7528 MinGW \u6216 Clang\u3002 \u8bbe\u7f6e\u6784\u5efa\u7cfb\u7edf\uff1a\u63a5\u4e0b\u6765\uff0c\u9700\u8981\u4e3a Sublime Text \u8bbe\u7f6e\u4e00\u4e2a\u6784\u5efa\u7cfb\u7edf\u3002\u8fd9\u5c06\u544a\u8bc9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20671","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20671"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20671\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}