{"id":52203,"date":"2024-12-03T16:57:15","date_gmt":"2024-12-03T08:57:15","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52203\/"},"modified":"2024-12-03T16:57:15","modified_gmt":"2024-12-03T08:57:15","slug":"linux%e9%87%8c%e7%9a%84gcc%e6%80%8e%e4%b9%88%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52203\/","title":{"rendered":"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528<\/h1>\n<p>\u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300alinux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u300b<\/span>\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~<\/p>\n<\/p>\n<blockquote>\n<p>\u5728linux\u4e2d\uff0cgcc\u5168\u79f0\u201cGNU Compiler Collection\u201d\uff0c\u4e2d\u6587\u610f\u601d\u4e3a\u201cGNU\u7f16\u8bd1\u5668\u5957\u4ef6\u201d\uff0c\u662f\u7531GNU\u5f00\u53d1\u7684\u7f16\u7a0b\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u662f\u4e00\u4e2a\u80fd\u591f\u7f16\u8bd1\u591a\u79cd\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\u3002gcc\u5957\u4ef6\u5305\u62ecC\u3001C++\u3001 Objective-C\u3001 Fortran\u3001Java\u3001Ada\u548cGo\u8bed\u8a00\u524d\u7aef\uff0c\u4e5f\u5305\u62ec\u4e86\u8fd9\u4e9b\u8bed\u8a00\u7684\u5e93\u3002<\/p>\n<\/blockquote>\n<p><strong>1\u3001\u4ec0\u4e48\u662fgcc<\/strong><\/p>\n<p>GCC\uff08GNU Compiler Collection\uff0cGNU\u7f16\u8bd1\u5668\u5957\u4ef6\uff09\u662f\u7531GNU\u5f00\u53d1\u7684\u7f16\u7a0b\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u5b83\u662f\u4e00\u4e2a\u80fd\u591f\u7f16\u8bd1\u591a\u79cd\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\u3002GNU\u7f16\u8bd1\u5668\u5957\u4ef6\u5305\u62ecC\u3001C++\u3001 Objective-C\u3001 Fortran\u3001Java\u3001Ada\u548cGo\u8bed\u8a00\u524d\u7aef\uff0c\u4e5f\u5305\u62ec\u4e86\u8fd9\u4e9b\u8bed\u8a00\u7684\u5e93\uff08\u5982libstdc++\uff0clibgcj\u7b49\u3002\uff09<\/p>\n<p>\u6700\u5f00\u59cbgcc\u662f\u4f5c\u4e3aC\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff08GNU C Compiler\uff09\uff0c\u73b0\u5728\u9664\u4e86c\u8bed\u8a00\uff0c\u8fd8\u652f\u6301C++\u3001java\u3001Pascal\u7b49\u8bed\u8a00\u3002gcc\u652f\u6301\u591a\u79cd\u786c\u4ef6\u5e73\u53f0\u3002<\/p>\n<p><strong>2\u3001gcc\u7684\u7279\u70b9<\/strong><\/p>\n<ul>\n<li>\n<p>gcc\u662f\u4e00\u4e2a\u53ef\u79fb\u690d\u7684\u7f16\u8bd1\u5668\uff0c\u652f\u6301\u591a\u79cd\u786c\u4ef6\u5e73\u53f0\u3002\u4f8b\u5982ARM\u3001X86\u7b49\u7b49\u3002<\/p>\n<\/li>\n<li>\n<p>gcc\u4e0d\u4ec5\u662f\u4e2a\u672c\u5730\u7f16\u8bd1\u5668\uff0c\u5b83\u8fd8\u80fd\u8de8\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u3002\u6240\u8c13\u7684\u672c\u5730\u7f16\u8bd1\u5668\uff0c\u662f\u6307\u7f16\u8bd1\u51fa\u6765\u7684\u7a0b\u5e8f\u53ea\u80fd\u591f\u5728\u672c\u5730\u73af\u5883\u8fdb\u884c\u8fd0\u884c\u3002\u800cgcc\u7f16\u8bd1\u51fa\u6765\u7684\u7a0b\u5e8f\u80fd\u591f\u5728\u5176\u4ed6\u5e73\u53f0\u8fdb\u884c\u8fd0\u884c\u3002\u4f8b\u5982\u5d4c\u5165\u5f0f\u7a0b\u5e8f\u53ef\u5728x86\u4e0a\u7f16\u8bd1\uff0c\u7136\u540e\u5728arm\u4e0a\u8fd0\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>gcc\u6709\u591a\u79cd\u8bed\u8a00\u524d\u7aef\uff0c\u7528\u4e8e\u89e3\u6790\u4e0d\u540c\u7684\u8bed\u8a00\u3002<\/p>\n<\/li>\n<li>\n<p>gcc\u662f\u6309\u6a21\u5757\u5316\u8bbe\u8ba1\u7684\uff0c\u53ef\u4ee5\u52a0\u5165\u65b0\u8bed\u8a00\u548c\u65b0CPU\u67b6\u6784\u7684\u652f\u6301\u3002<\/p>\n<\/li>\n<li>\n<p>gcc\u662f\u81ea\u7531\u8f6f\u4ef6\u3002\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4f7f\u7528\u6216\u66f4\u6539\u8fd9\u4e2a\u8f6f\u4ef6\u3002<\/p>\n<\/li>\n<\/ul>\n<p><strong>3\u3001gcc\u7f16\u8bd1\u7a0b\u5e8f\u7684\u8fc7\u7a0b<\/strong><\/p>\n<p>gcc\u7f16\u8bd1\u7a0b\u5e8f\u4e3b\u8981\u7ecf\u8fc7\u56db\u4e2a\u8fc7\u7a0b\uff1a<\/p>\n<ul>\n<li>\n<p>\u9884\u5904\u7406\uff08Pre-Processing\uff09<\/p>\n<\/li>\n<li>\n<p>\u7f16\u8bd1 \uff08Compiling\uff09<\/p>\n<\/li>\n<li>\n<p>\u6c47\u7f16 \uff08Assembling\uff09<\/p>\n<\/li>\n<li>\n<p>\u94fe\u63a5 \uff08Linking\uff09<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240416\/1713269191661e69c728d50.jpg\" class=\"aligncenter\" title=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe\" alt=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240416\/1713269191661e69c728d50.jpg\" class=\"aligncenter\" title=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe\" alt=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe\" \/>  <\/p>\n<p>\u9884\u5904\u7406\u5b9e\u9645\u4e0a\u662f\u5c06\u5934\u6587\u4ef6\u3001\u5b8f\u8fdb\u884c\u5c55\u5f00\u3002\u7f16\u8bd1\u9636\u6bb5\uff0cgcc\u8c03\u7528\u4e0d\u540c\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u4f8b\u5982c\u8bed\u8a00\u8c03\u7528\u7f16\u8bd1\u5668ccl\u3002gcc\u5b9e\u9645\u4e0a\u662f\u4e2a\u5de5\u5177\u94fe\uff0c\u5728\u7f16\u8bd1\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\u8c03\u7528\u4e0d\u540c\u7684\u5de5\u5177\u3002\u6c47\u7f16\u9636\u6bb5\uff0cgcc\u8c03\u7528\u6c47\u7f16\u5668\u8fdb\u884c\u6c47\u7f16\u3002\u94fe\u63a5\u8fc7\u7a0b\u4f1a\u5c06\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u76ee\u6807\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u6c47\u7f16\u5668\u751f\u6210\u7684\u662f\u53ef\u91cd\u5b9a\u4f4d\u7684\u76ee\u6807\u6587\u4ef6\uff0c\u5b66\u8fc7\u64cd\u4f5c\u7cfb\u7edf\uff0c\u6211\u4eec\u77e5\u9053\uff0c\u5728\u6e90\u7a0b\u5e8f\u4e2d\u5730\u5740\u662f\u4ece0\u5f00\u59cb\u7684\uff0c\u8fd9\u662f\u4e00\u4e2a\u76f8\u5bf9\u5730\u5740\uff0c\u800c\u7a0b\u5e8f\u771f\u6b63\u5728\u5185\u5b58\u4e2d\u8fd0\u884c\u65f6\u7684\u5730\u5740\u80af\u5b9a\u4e0d\u662f\u4ece0\u5f00\u59cb\u7684\uff0c\u800c\u4e14\u5728\u7f16\u5199\u6e90\u4ee3\u7801\u7684\u65f6\u5019\u4e5f\u4e0d\u80fd\u77e5\u9053\u7a0b\u5e8f\u7684\u7edd\u5bf9\u5730\u5740\uff0c\u6240\u4ee5<strong>\u91cd\u5b9a\u4f4d<\/strong>\u80fd\u591f\u5c06\u6e90\u4ee3\u7801\u7684\u4ee3\u7801\u3001\u53d8\u91cf\u7b49\u5b9a\u4f4d\u4e3a\u5185\u5b58\u5177\u4f53\u5730\u5740\u3002<\/p>\n<p>\u4e0b\u9762\u4ee5\u4e00\u5f20\u56fe\u6765\u8868\u793a\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u6ce8\u610f\u8fc7\u7a0b\u4e2d\u6587\u4ef6\u7684\u540e\u7f00\u53d8\u5316\uff0c\u7f16\u8bd1\u9009\u9879\u548c\u8fd9\u4e9b\u540e\u7f00\u6709\u5173\u3002<\/p>\n<p>\u8fd9\u662fGCC\u7f16\u8bd1\u7684\u56db\u4e2a\u6b65\u9aa4\u3002<\/p>\n<p><strong>4\u3001gcc\u5e38\u7528\u9009\u9879<\/strong><\/p>\n<p>\u6765\u770b\u4e00\u4e0bgcc\u5e38\u7528\u9009\u9879<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240416\/1713269191661e69c72f5cb.jpg\" class=\"aligncenter\" title=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe1\" alt=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe1\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20240416\/1713269191661e69c72f5cb.jpg\" class=\"aligncenter\" title=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe1\" alt=\"linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u63d2\u56fe1\" \/>  <\/p>\n<p>\u73b0\u5728\u6211\u4eec\u6709\u6e90\u6587\u4ef6hello.c\uff0c\u4e0b\u9762\u662f\u4e00\u4e9bgcc\u7684\u4f7f\u7528\u793a\u4f8b\uff1a<\/p>\n<pre>gcc&nbsp;-E&nbsp;hello.c&nbsp;-o&nbsp;hello.i&nbsp;&nbsp;&nbsp;\u5bf9hello.c\u6587\u4ef6\u8fdb\u884c\u9884\u5904\u7406\uff0c\u751f\u6210\u4e86hello.i&nbsp;\u6587\u4ef6\ngcc&nbsp;-S&nbsp;hello.i&nbsp;-o&nbsp;hello.s&nbsp;&nbsp;&nbsp;&nbsp;\u5bf9\u9884\u5904\u7406\u6587\u4ef6\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210\u4e86\u6c47\u7f16\u6587\u4ef6\ngcc&nbsp;-c&nbsp;hello.s&nbsp;-o&nbsp;hello.o&nbsp;&nbsp;\u5bf9\u6c47\u7f16\u6587\u4ef6\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210\u4e86\u76ee\u6807\u6587\u4ef6\ngcc&nbsp;hello.o&nbsp;-o&nbsp;hello&nbsp;\u5bf9\u76ee\u6807\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5\uff0c\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\ngcc&nbsp;hello.c&nbsp;-o&nbsp;hello&nbsp;\u76f4\u63a5\u7f16\u8bd1\u94fe\u63a5\u6210\u53ef\u6267\u884c\u76ee\u6807\u6587\u4ef6\ngcc&nbsp;-c&nbsp;hello.c&nbsp;\u6216&nbsp;gcc&nbsp;-c&nbsp;hello.c&nbsp;-o&nbsp;hello.o&nbsp;\u7f16\u8bd1\u751f\u6210\u53ef\u91cd\u5b9a\u4f4d\u76ee\u6807\u6587\u4ef6<\/pre>\n<p>\u4f7f\u7528gcc\u65f6\u53ef\u4ee5\u52a0\u4e0a-Wall\u9009\u9879\u3002\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\u5982\u679c\u4e0d\u52a0\u4e0a-Wall\u9009\u9879\uff0c\u7f16\u8bd1\u5668\u4e0d\u4f1a\u62a5\u51fa\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\uff0c\u4f46\u662f\u7a0b\u5e8f\u7684\u7ed3\u679c\u5374\u4e0d\u662f\u9884\u671f\u7684\uff1a<\/p>\n<pre>\/\/bad.c\n#include&lt;stdio.h&gt;\nint&nbsp;main()\n{\n&nbsp;&nbsp;&nbsp;&nbsp;printf(\"the&nbsp;number&nbsp;is&nbsp;%f&nbsp;\",5);&nbsp;&nbsp;\/\/\u7a0b\u5e8f\u8f93\u51fa\u4e86the&nbsp;number&nbsp;is&nbsp;0.000000\uff0c\u7ed3\u679c\u9519\u8bef\n&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0;\n&nbsp;}<\/pre>\n<p>\u4f7f\u7528-Wall\u9009\u9879\uff1a<\/p>\n<pre>gcc&nbsp;-Wall&nbsp;bad.c&nbsp;-o&nbsp;bad<\/pre>\n<p>gcc\u5c06\u8f93\u51fa\u8b66\u544a\u4fe1\u606f\uff1a<\/p>\n<pre>warning:&nbsp;format&nbsp;\u2018%f\u2019&nbsp;expects&nbsp;argument&nbsp;of&nbsp;type&nbsp;\u2018double\u2019,&nbsp;but&nbsp;argument&nbsp;2&nbsp;has&nbsp;type&nbsp;\u2018int\u2019&nbsp;[-Wformat=]\nprintf(\"the&nbsp;number&nbsp;is&nbsp;%f\\n\",5);<\/pre>\n<p><strong>5\u3001gcc\u7f16\u8bd1\u591a\u4e2a\u6587\u4ef6<\/strong><\/p>\n<pre>\/\/&nbsp;hello.c\n#include&lt;stdio.h&gt;\n#include\"hello.h\"\nvoid&nbsp;printHello()\n{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(\"hello&nbsp;world!\\n\");\n}<\/pre>\n<pre>\/\/main.c\n#include&lt;stdio.h&gt;\n#include\"hello.h\"\nint&nbsp;main()\n{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printHello();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0;\n}<\/pre>\n<pre>\/\/hello.h\n\/\/\u4ec5\u5305\u542b\u51fd\u6570\u58f0\u660e\n#ifndef&nbsp;_HELLO_\n#define&nbsp;_HELLO_\nvoid&nbsp;printHello();\n#endif<\/pre>\n<p>\u7f16\u8bd1\u8fd9\u4e09\u4e2a\u6587\u4ef6\uff0c\u53ef\u4ee5\u4e00\u6b21\u7f16\u8bd1\uff1a<\/p>\n<pre>gcc&nbsp;hello.c&nbsp;main.c&nbsp;-o&nbsp;main&nbsp;\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6main<\/pre>\n<p>\u4e5f\u53ef\u4ee5\u72ec\u7acb\u7f16\u8bd1\uff1a<\/p>\n<pre>gcc&nbsp;-Wall&nbsp;-c&nbsp;main.c&nbsp;-o&nbsp;main.o\ngcc&nbsp;-Wall&nbsp;-c&nbsp;hello.c&nbsp;-o&nbsp;hello.o\ngcc&nbsp;-Wall&nbsp;main.o&nbsp;hello.o&nbsp;-o&nbsp;main<\/pre>\n<p>\u72ec\u7acb\u7f16\u8bd1\u7684\u597d\u5904\u662f\uff0c\u5f53\u5176\u4e2d\u67d0\u4e2a\u6a21\u5757\u53d1\u9001\u6539\u53d8\u65f6\uff0c\u53ea\u9700\u8981\u7f16\u8bd1\u8be5\u6a21\u5757\u5c31\u884c\uff0c\u4e0d\u5fc5\u91cd\u65b0\u7f16\u8bd1\u6240\u6709\u6587\u4ef6\uff0c\u8fd9\u6837\u53ef\u4ee5\u8282\u7701\u7f16\u8bd1\u65f6\u95f4\u3002<\/p>\n<p><strong>6\u3001\u4f7f\u7528\u5916\u90e8\u5e93<\/strong><\/p>\n<p>\u5728\u4f7f\u7528C\u8bed\u8a00\u548c\u5176\u4ed6\u8bed\u8a00\u8fdb\u884c\u7a0b\u5e8f\u8bbe\u8ba1\u7684\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u5934\u6587\u4ef6\u6765\u63d0\u4f9b\u5bf9\u5e38\u6570\u7684\u5b9a\u4e49\u548c\u5bf9\u7cfb\u7edf\u53ca\u5e93\u51fd\u6570\u8c03\u7528\u7684\u58f0\u660e\u3002\u5e93\u6587\u4ef6\u662f\u4e00\u4e9b\u9884\u5148\u7f16\u8bd1\u597d\u7684\u51fd\u6570\u96c6\u5408\uff0c\u90a3\u4e9b\u51fd\u6570\u90fd\u662f\u6309\u7167\u53ef\u91cd\u7528\u539f\u5219\u7f16\u5199\u7684\u3002\u5b83\u4eec\u901a\u5e38\u7531\u4e00\u7ec4\u4e92\u76f8\u5173\u8054\u7684\u53ef\u91cd\u7528\u539f\u5219\u7f16\u5199\u7684\uff0c\u5b83\u4eec\u901a\u5e38\u7531\u4e00\u7ec4\u4e92\u76f8\u5173\u8054\u7684\u7528\u6765\u5b8c\u6210\u67d0\u9879\u5e38\u89c1\u5de5\u4f5c\u7684\u51fd\u6570\u6784\u6210\u3002\u4f7f\u7528\u5e93\u7684\u4f18\u70b9\u5728\u4e8e\uff1a<\/p>\n<ul>\n<li>\n<p>\u6a21\u5757\u5316\u7684\u5f00\u53d1<\/p>\n<\/li>\n<li>\n<p>\u53ef\u91cd\u7528\u6027<\/p>\n<\/li>\n<li>\n<p>\u53ef\u7ef4\u62a4\u6027<\/p>\n<\/li>\n<\/ul>\n<p>\u5e93\u53c8\u53ef\u4ee5\u5206\u4e3a\u9759\u6001\u5e93\u4e0e\u52a8\u6001\u5e93\uff1a<\/p>\n<ul>\n<li>\n<p>\u9759\u6001\u5e93\uff08.a\uff09\uff1a\u7a0b\u5e8f\u5728\u7f16\u8bd1\u94fe\u63a5\u7684\u65f6\u5019\u628a\u5e93\u7684\u4ee3\u7801\u94fe\u63a5\u5230\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u3002\u7a0b\u5e8f\u8fd0\u884c\u7684\u65f6\u5019\u5c06\u4e0d\u518d\u9700\u8981\u9759\u6001\u5e93\u3002\u9759\u6001\u5e93\u6bd4\u8f83\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\uff0c\u800c\u4e14\u7a0b\u5e8f\u4e0d\u53ef\u4ee5\u5171\u4eab\u9759\u6001\u5e93\u3002\u8fd0\u884c\u65f6\u4e5f\u662f\u6bd4\u8f83\u5360\u5185\u5b58\u7684\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u7a0b\u5e8f\u90fd\u5305\u542b\u4e86\u4e00\u4efd\u9759\u6001\u5e93\u3002<\/p>\n<\/li>\n<li>\n<p>\u52a8\u6001\u5e93\uff08.so\u6216.sa\uff09\uff1a\u7a0b\u5e8f\u5728\u8fd0\u884c\u7684\u65f6\u5019\u624d\u53bb\u94fe\u63a5\u5171\u4eab\u5e93\u7684\u4ee3\u7801\uff0c\u591a\u4e2a\u7a0b\u5e8f\u5171\u4eab\u4f7f\u7528\u5e93\u7684\u4ee3\u7801\uff0c\u8fd9\u6837\u5c31\u51cf\u5c11\u4e86\u7a0b\u5e8f\u7684\u4f53\u79ef\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4e00\u822c\u5934\u6587\u4ef6\u6216\u5e93\u6587\u4ef6\u7684\u4f4d\u7f6e\u5728\uff1a<\/p>\n<ul>\n<li>\n<p>\/usr\/include\u53ca\u5176\u5b50\u76ee\u5f55\u5e95\u4e0b\u7684include\u6587\u4ef6\u5939<\/p>\n<\/li>\n<li>\n<p>\/usr\/local\/include\u53ca\u5176\u5b50\u76ee\u5f55\u5e95\u4e0b\u7684include\u6587\u4ef6\u5939<\/p>\n<\/li>\n<li>\n<p>\/usr\/lib<\/p>\n<\/li>\n<li>\n<p>\/usr\/local\/lib<\/p>\n<\/li>\n<li>\n<p>\/lib<\/p>\n<\/li>\n<\/ul>\n<p><strong>7\u3001\u751f\u6210\u9759\u6001\u5e93<\/strong><\/p>\n<p>\u4e3a\u4e86\u751f\u6210.a\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5148\u751f\u6210.o\u6587\u4ef6\u3002\u4e0b\u9762\u8fd9\u884c\u547d\u4ee4\u5c06\u6211\u4eec\u7684hello.o\u6253\u5305\u6210\u9759\u6001\u5e93libhello.a\uff1a<\/p>\n<pre>ar&nbsp;rcs&nbsp;libhello.a&nbsp;hello.o<\/pre>\n<p>ar\u662fgun\u5f52\u6863\u5de5\u5177\uff0crcs\u8868\u793areplace and create\uff0c\u5982\u679clibhello\u4e4b\u524d\u5b58\u5728\uff0c\u5c06\u521b\u5efa\u65b0\u7684libhello.a\u5e76\u5c06\u5176\u66ff\u6362\u3002<\/p>\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u8fd9\u6837\u6765\u4f7f\u7528\u9759\u6001\u5e93libhello.a<\/p>\n<pre>gcc&nbsp;-Wall&nbsp;main.c&nbsp;libhello.a&nbsp;-o&nbsp;main<\/pre>\n<p>\u8fd8\u6709\u53e6\u5916\u4e00\u79cd\u4f7f\u7528\u65b9\u5f0f\uff1a<\/p>\n<pre>gcc&nbsp;-Wall&nbsp;-L.&nbsp;main.c&nbsp;-o&nbsp;main&nbsp;-lhello&nbsp;\u3010lhello&nbsp;\u662f&nbsp;libhello\u7684\u7f29\u5199\u3011<\/pre>\n<p>\u5176\u4e2d <strong>-L.<\/strong>\u8868\u793a\u5e93\u6587\u4ef6\u7684\u4f4d\u7f6e\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u7531\u4e8elibhello.a\u662f\u6211\u4eec\u81ea\u5df1\u751f\u6210\u7684\uff0c\u5e76\u5b58\u653e\u5728\u5f53\u524d\u5f55\u4e0b\u4e0b\uff0c\u6240\u4ee5\u9700\u8981\u52a0\u4e0a-L.\u9009\u9879\u3002\u9ed8\u8ba4\u5e93\u6587\u4ef6\u662f\u5728\u7cfb\u7edf\u7684\u76ee\u5f55\u4e0b\u8fdb\u884c\u641c\u7d22\u3002\u540c\u6837\u7684\uff0c-I.\u9009\u9879\u7528\u4e8e\u5934\u6587\u4ef6\u7684\u641c\u7d22\u3002<\/p>\n<p><strong>8\u3001\u751f\u6210\u5171\u4eab\u5e93<\/strong><\/p>\n<p>\u751f\u6210\u4e00\u4e2a\u5171\u4eab\u5e93\uff0c\u540d\u79f0\u7684\u89c4\u5219\u662flibxxx.so\u3002\u5c06\u521a\u624dhello.o\u751f\u6210libhello.so\u7684\u547d\u4ee4\u4e3a\uff1a<\/p>\n<pre>gcc&nbsp;-shared&nbsp;-fPIC&nbsp;hello.o&nbsp;-o&nbsp;libhello.so<\/pre>\n<p>\u751f\u6210\u4e86\u5171\u4eab\u5e93\u4e4b\u540e\uff0c\u53ef\u4ee5\u8fd9\u6837\u6765\u4f7f\u7528\u5171\u4eab\u5e93\uff1a<\/p>\n<pre>gcc&nbsp;-Wall&nbsp;main.o&nbsp;-o&nbsp;main&nbsp;-L.&nbsp;-lhello<\/pre>\n<p>\u8be5\u547d\u4ee4\u4e0e\u4f7f\u7528\u9759\u6001\u5e93\u7684\u547d\u4ee4\u76f8\u540c\uff0c\u4f46\u662f\u5728\u5171\u4eab\u5e93\u4e0e\u9759\u6001\u5e93\u5171\u5b58\u7684\u60c5\u51b5\u4e0b\uff0c\u4f18\u5148\u4f7f\u7528\u5171\u4eab\u5e93\u3002<\/p>\n<p>\u5171\u4eab\u5e93\u6709\u65f6\u5019\u5e76\u4e0d\u4e0d\u5728\u5f53\u524d\u7684\u76ee\u5f55\u4e0b\uff0c\u4e3a\u4e86\u8ba9gcc\u80fd\u591f\u627e\u5f97\u5230\u5171\u4eab\u5e93\uff0c\u6709\u4e0b\u9762\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li>\n<p>\u62f7\u8d1d.so\u6587\u4ef6\u5230\u7cfb\u7edf\u5171\u4eab\u5e93\u8def\u5f84\u4e0b\uff0c\u4e00\u822c\u6307\/usr\/lib<\/p>\n<\/li>\n<li>\n<p>\u5728~\/.bash_profile\u6587\u4ef6\u4e2d\uff0c\u914d\u7f6eLD_LIBRARY_PATH\u53d8\u91cf<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\/etc\/ld.so.conf\uff0c\u914d\u7f6e\u5b8c\u6210\u540e\u8c03\u7528ldconfig\u66f4\u65b0ld.so.cache<\/p>\n<\/li>\n<\/ul>\n<p>\u5176\u4e2d\uff0cshared\u9009\u9879\u8868\u793a\u751f\u6210\u5171\u4eab\u5e93\u683c\u5f0f\u3002fPIC\u8868\u793a\u4ea7\u751f\u4f4d\u7f6e\u65e0\u5173\u7801\uff08position independent code\uff09\uff0c\u4f4d\u7f6e\u65e0\u5173\u7801\u8868\u793a\u5b83\u7684\u8fd0\u884c\u3001\u52a0\u8f7d\u4e0e\u5185\u5b58\u4f4d\u7f6e\u65e0\u5173\uff0c\u53ef\u4ee5\u5728\u4efb\u4f55\u5185\u5b58\u5730\u5740\u8fdb\u884c\u52a0\u8f7d\u3002<\/p>\n<p><strong>9\u3001\u5e93\u7684\u641c\u7d22\u8def\u5f84<\/strong><\/p>\n<p>\u5e93\u7684\u641c\u7d22\u8def\u5f84\u9075\u5faa\u51e0\u4e2a\u641c\u7d22\u539f\u5219\uff1a\u4ece\u5de6\u5230\u53f3\u641c\u7d22-I -l\u6307\u5b9a\u7684\u76ee\u5f55\uff0c\u5982\u679c\u5728\u8fd9\u4e9b\u76ee\u5f55\u4e2d\u627e\u4e0d\u5230\uff0c\u90a3\u4e48gcc\u4f1a\u4ece\u7531<strong>\u73af\u5883 \u53d8\u91cf\u6307\u5b9a\u7684\u76ee\u5f55<\/strong>\u8fdb\u884c\u67e5\u627e\u3002\u5934\u6587\u4ef6\u7684\u73af\u5883\u53d8\u91cf\u662f<strong>C_INCLUDE_PATH<\/strong>,\u5e93\u7684\u73af\u5883\u53d8\u91cf\u662f<strong>LIBRARY_PATH<\/strong>.\u5982\u679c\u8fd8\u662f\u627e\u4e0d\u5230\uff0c\u90a3\u4e48\u4f1a\u4ece<strong>\u7cfb\u7edf\u6307\u5b9a\u6307\u5b9a\u7684\u76ee\u5f55<\/strong>\u8fdb\u884c\u641c\u7d22\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300alinux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591a\u6587\u7ae0\u77e5\u8bc6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528 \u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587\u300alinux\u91cc\u7684gcc\u600e\u4e48\u4f7f\u7528\u300b\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60\u6587\u7ae0\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~ \u5728linux\u4e2d\uff0cgcc\u5168\u79f0\u201cGNU Compiler Collection\u201d\uff0c\u4e2d\u6587\u610f\u601d\u4e3a\u201cGNU\u7f16\u8bd1\u5668\u5957\u4ef6\u201d\uff0c\u662f\u7531GNU\u5f00\u53d1\u7684\u7f16\u7a0b\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u662f\u4e00\u4e2a\u80fd\u591f\u7f16\u8bd1\u591a\u79cd\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\u3002gcc\u5957\u4ef6\u5305\u62ecC\u3001C++\u3001 Objective-C\u3001 Fortran\u3001Java\u3001Ada\u548cGo\u8bed\u8a00\u524d\u7aef\uff0c\u4e5f\u5305\u62ec\u4e86\u8fd9\u4e9b\u8bed\u8a00\u7684\u5e93\u3002 1\u3001\u4ec0\u4e48\u662fgcc GCC\uff08GNU Compiler Collection\uff0cGNU\u7f16\u8bd1\u5668\u5957\u4ef6\uff09\u662f\u7531GNU\u5f00\u53d1\u7684\u7f16\u7a0b\u8bed\u8a00\u7f16\u8bd1\u5668\uff0c\u5b83\u662f\u4e00\u4e2a\u80fd\u591f\u7f16\u8bd1\u591a\u79cd\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\u3002GNU\u7f16\u8bd1\u5668\u5957\u4ef6\u5305\u62ecC\u3001C++\u3001 Objective-C\u3001 Fortran\u3001Java\u3001Ada\u548cGo\u8bed\u8a00\u524d\u7aef\uff0c\u4e5f\u5305\u62ec\u4e86\u8fd9\u4e9b\u8bed\u8a00\u7684\u5e93\uff08\u5982libstdc++\uff0clibgcj\u7b49\u3002\uff09 \u6700\u5f00\u59cbgcc\u662f\u4f5c\u4e3aC\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff08GNU C Compiler\uff09\uff0c\u73b0\u5728\u9664\u4e86c\u8bed\u8a00\uff0c\u8fd8\u652f\u6301C++\u3001java\u3001Pascal\u7b49\u8bed\u8a00\u3002gcc\u652f\u6301\u591a\u79cd\u786c\u4ef6\u5e73\u53f0\u3002 2\u3001gcc\u7684\u7279\u70b9 gcc\u662f\u4e00\u4e2a\u53ef\u79fb\u690d\u7684\u7f16\u8bd1\u5668\uff0c\u652f\u6301\u591a\u79cd\u786c\u4ef6\u5e73\u53f0\u3002\u4f8b\u5982ARM\u3001X86\u7b49\u7b49\u3002 gcc\u4e0d\u4ec5\u662f\u4e2a\u672c\u5730\u7f16\u8bd1\u5668\uff0c\u5b83\u8fd8\u80fd\u8de8\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u3002\u6240\u8c13\u7684\u672c\u5730\u7f16\u8bd1\u5668\uff0c\u662f\u6307\u7f16\u8bd1\u51fa\u6765\u7684\u7a0b\u5e8f\u53ea\u80fd\u591f\u5728\u672c\u5730\u73af\u5883\u8fdb\u884c\u8fd0\u884c\u3002\u800cgcc\u7f16\u8bd1\u51fa\u6765\u7684\u7a0b\u5e8f\u80fd\u591f\u5728\u5176\u4ed6\u5e73\u53f0\u8fdb\u884c\u8fd0\u884c\u3002\u4f8b\u5982\u5d4c\u5165\u5f0f\u7a0b\u5e8f\u53ef\u5728x86\u4e0a\u7f16\u8bd1\uff0c\u7136\u540e\u5728arm\u4e0a\u8fd0\u884c\u3002 gcc\u6709\u591a\u79cd\u8bed\u8a00\u524d\u7aef\uff0c\u7528\u4e8e\u89e3\u6790\u4e0d\u540c\u7684\u8bed\u8a00\u3002 gcc\u662f\u6309\u6a21\u5757\u5316\u8bbe\u8ba1\u7684\uff0c\u53ef\u4ee5\u52a0\u5165\u65b0\u8bed\u8a00\u548c\u65b0CPU\u67b6\u6784\u7684\u652f\u6301\u3002 gcc\u662f\u81ea\u7531\u8f6f\u4ef6\u3002\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4f7f\u7528\u6216\u66f4\u6539\u8fd9\u4e2a\u8f6f\u4ef6\u3002 3\u3001gcc\u7f16\u8bd1\u7a0b\u5e8f\u7684\u8fc7\u7a0b gcc\u7f16\u8bd1\u7a0b\u5e8f\u4e3b\u8981\u7ecf\u8fc7\u56db\u4e2a\u8fc7\u7a0b\uff1a \u9884\u5904\u7406\uff08Pre-Processing\uff09 \u7f16\u8bd1 \uff08Compiling\uff09 \u6c47\u7f16 \uff08Assembling\uff09 \u94fe\u63a5 \uff08Linking\uff09 \u9884\u5904\u7406\u5b9e\u9645\u4e0a\u662f\u5c06\u5934\u6587\u4ef6\u3001\u5b8f\u8fdb\u884c\u5c55\u5f00\u3002\u7f16\u8bd1\u9636\u6bb5\uff0cgcc\u8c03\u7528\u4e0d\u540c\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u4f8b\u5982c\u8bed\u8a00\u8c03\u7528\u7f16\u8bd1\u5668ccl\u3002gcc\u5b9e\u9645\u4e0a\u662f\u4e2a\u5de5\u5177\u94fe\uff0c\u5728\u7f16\u8bd1\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\u8c03\u7528\u4e0d\u540c\u7684\u5de5\u5177\u3002\u6c47\u7f16\u9636\u6bb5\uff0cgcc\u8c03\u7528\u6c47\u7f16\u5668\u8fdb\u884c\u6c47\u7f16\u3002\u94fe\u63a5\u8fc7\u7a0b\u4f1a\u5c06\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u76ee\u6807\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u6c47\u7f16\u5668\u751f\u6210\u7684\u662f\u53ef\u91cd\u5b9a\u4f4d\u7684\u76ee\u6807\u6587\u4ef6\uff0c\u5b66\u8fc7\u64cd\u4f5c\u7cfb\u7edf\uff0c\u6211\u4eec\u77e5\u9053\uff0c\u5728\u6e90\u7a0b\u5e8f\u4e2d\u5730\u5740\u662f\u4ece0\u5f00\u59cb\u7684\uff0c\u8fd9\u662f\u4e00\u4e2a\u76f8\u5bf9\u5730\u5740\uff0c\u800c\u7a0b\u5e8f\u771f\u6b63\u5728\u5185\u5b58\u4e2d\u8fd0\u884c\u65f6\u7684\u5730\u5740\u80af\u5b9a\u4e0d\u662f\u4ece0\u5f00\u59cb\u7684\uff0c\u800c\u4e14\u5728\u7f16\u5199\u6e90\u4ee3\u7801\u7684\u65f6\u5019\u4e5f\u4e0d\u80fd\u77e5\u9053\u7a0b\u5e8f\u7684\u7edd\u5bf9\u5730\u5740\uff0c\u6240\u4ee5\u91cd\u5b9a\u4f4d\u80fd\u591f\u5c06\u6e90\u4ee3\u7801\u7684\u4ee3\u7801\u3001\u53d8\u91cf\u7b49\u5b9a\u4f4d\u4e3a\u5185\u5b58\u5177\u4f53\u5730\u5740\u3002 \u4e0b\u9762\u4ee5\u4e00\u5f20\u56fe\u6765\u8868\u793a\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u6ce8\u610f\u8fc7\u7a0b\u4e2d\u6587\u4ef6\u7684\u540e\u7f00\u53d8\u5316\uff0c\u7f16\u8bd1\u9009\u9879\u548c\u8fd9\u4e9b\u540e\u7f00\u6709\u5173\u3002 \u8fd9\u662fGCC\u7f16\u8bd1\u7684\u56db\u4e2a\u6b65\u9aa4\u3002 4\u3001gcc\u5e38\u7528\u9009\u9879 \u6765\u770b\u4e00\u4e0bgcc\u5e38\u7528\u9009\u9879 \u73b0\u5728\u6211\u4eec\u6709\u6e90\u6587\u4ef6hello.c\uff0c\u4e0b\u9762\u662f\u4e00\u4e9bgcc\u7684\u4f7f\u7528\u793a\u4f8b\uff1a gcc&nbsp;-E&nbsp;hello.c&nbsp;-o&nbsp;hello.i&nbsp;&nbsp;&nbsp;\u5bf9hello.c\u6587\u4ef6\u8fdb\u884c\u9884\u5904\u7406\uff0c\u751f\u6210\u4e86hello.i&nbsp;\u6587\u4ef6 gcc&nbsp;-S&nbsp;hello.i&nbsp;-o&nbsp;hello.s&nbsp;&nbsp;&nbsp;&nbsp;\u5bf9\u9884\u5904\u7406\u6587\u4ef6\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210\u4e86\u6c47\u7f16\u6587\u4ef6 gcc&nbsp;-c&nbsp;hello.s&nbsp;-o&nbsp;hello.o&nbsp;&nbsp;\u5bf9\u6c47\u7f16\u6587\u4ef6\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210\u4e86\u76ee\u6807\u6587\u4ef6 gcc&nbsp;hello.o&nbsp;-o&nbsp;hello&nbsp;\u5bf9\u76ee\u6807\u6587\u4ef6\u8fdb\u884c\u94fe\u63a5\uff0c\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6 gcc&nbsp;hello.c&nbsp;-o&nbsp;hello&nbsp;\u76f4\u63a5\u7f16\u8bd1\u94fe\u63a5\u6210\u53ef\u6267\u884c\u76ee\u6807\u6587\u4ef6 gcc&nbsp;-c&nbsp;hello.c&nbsp;\u6216&nbsp;gcc&nbsp;-c&nbsp;hello.c&nbsp;-o&nbsp;hello.o&nbsp;\u7f16\u8bd1\u751f\u6210\u53ef\u91cd\u5b9a\u4f4d\u76ee\u6807\u6587\u4ef6 \u4f7f\u7528gcc\u65f6\u53ef\u4ee5\u52a0\u4e0a-Wall\u9009\u9879\u3002\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\u5982\u679c\u4e0d\u52a0\u4e0a-Wall\u9009\u9879\uff0c\u7f16\u8bd1\u5668\u4e0d\u4f1a\u62a5\u51fa\u4efb\u4f55\u9519\u8bef\u6216\u8b66\u544a\uff0c\u4f46\u662f\u7a0b\u5e8f\u7684\u7ed3\u679c\u5374\u4e0d\u662f\u9884\u671f\u7684\uff1a \/\/bad.c #include&lt;stdio.h&gt; int&nbsp;main() { &nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;the&nbsp;number&nbsp;is&nbsp;%f&nbsp;&#8220;,5);&nbsp;&nbsp;\/\/\u7a0b\u5e8f\u8f93\u51fa\u4e86the&nbsp;number&nbsp;is&nbsp;0.000000\uff0c\u7ed3\u679c\u9519\u8bef &nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;0; &nbsp;} \u4f7f\u7528-Wall\u9009\u9879\uff1a gcc&nbsp;-Wall&nbsp;bad.c&nbsp;-o&nbsp;bad gcc\u5c06\u8f93\u51fa\u8b66\u544a\u4fe1\u606f\uff1a warning:&nbsp;format&nbsp;\u2018%f\u2019&nbsp;expects&nbsp;argument&nbsp;of&nbsp;type&nbsp;\u2018double\u2019,&nbsp;but&nbsp;argument&nbsp;2&nbsp;has&nbsp;type&nbsp;\u2018int\u2019&nbsp;[-Wformat=] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-52203","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52203","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=52203"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52203\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}