{"id":1392,"date":"2018-06-19T11:02:34","date_gmt":"2018-06-19T03:02:34","guid":{"rendered":"https:\/\/damogame.cn:15443\/wordpress\/?p=1392"},"modified":"2018-06-19T11:02:34","modified_gmt":"2018-06-19T03:02:34","slug":"libiconv%e5%ba%93%e9%93%be%e6%8e%a5%e9%97%ae%e9%a2%98%e4%b8%80%e5%88%99","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/1392","title":{"rendered":"libiconv\u5e93\u94fe\u63a5\u95ee\u9898\u4e00\u5219"},"content":{"rendered":"<div class=\"article-title-box\">\n<p class=\"title-article\">2017\u5e7401\u670820\u65e5 16:13:35<\/p>\n<\/div>\n<div class=\"article-info-box\">\n<div class=\"article-bar-top d-flex\">\n<div class=\"float-right\"><span class=\"read-count\">\u9605\u8bfb\u6570\uff1a538<\/span><\/div>\n<\/div>\n<\/div>\n<article>\n<div id=\"article_content\" class=\"article_content clearfix csdn-tracking-statistics\" data-pid=\"blog\" data-mod=\"popu_307\" data-dsm=\"post\">\n<div class=\"htmledit_views\">\n<p>http:\/\/tonybai.com\/2013\/04\/25\/a-libiconv-linkage-problem\/<\/p>\n<p>\u4e0e\u5728<a href=\"http:\/\/tonybai.com\/2009\/11\/05\/a-64bit-compiling-problem-on-x86-solaris\/\" target=\"_blank\" rel=\"noopener\">Solaris<\/a>\u7cfb\u7edf\u4e0a\u4e0d\u540c\uff0c<a href=\"http:\/\/tonybai.com\/2012\/12\/04\/upgrade-ubuntu-to-1204-lts\/\" target=\"_blank\" rel=\"noopener\">Linux<\/a>\u7684libc\u5e93\u4e2d\u5305\u542b\u4e86<a href=\"http:\/\/tonybai.com\/2009\/10\/31\/internal-code-transform-by-iconv\/\" target=\"_blank\" rel=\"noopener\">libiconv<\/a>\u5e93\u4e2d\u51fd\u6570\u7684\u5b9a\u4e49\uff0c\u56e0\u6b64\u5728Linux\u4e0a\u4f7f\u7528libiconv\u5e93\u76f8\u5173\u51fd\u6570\uff0c\u7f16\u8bd1\u65f6\u662f\u4e0d\u9700\u8981\u663e\u5f0f-liconv\u7684\u3002\u4f46\u6700\u8fd1\u6211\u7684\u4e00\u4f4d\u540c\u4e8b\u5728\u67d0redhat enterprise server 5.6\u673a\u5668\u4e0a\u7f16\u8bd1\u7a0b\u5e8f\u65f6\u5374\u9047\u5230\u4e86\u627e\u4e0d\u5230iconv\u5e93\u51fd\u6570\u7b26\u53f7\u7684<a href=\"http:\/\/tonybai.com\/2007\/12\/08\/those-things-about-symbol-linkage\/\" target=\"_blank\" rel=\"noopener\">\u94fe\u63a5\u95ee\u9898<\/a>\uff0c\u5230\u5e95\u662f\u600e\u6837\u4e00\u56de\u4e8b\u5462\uff1f\u8fd9\u91cc\u5206\u4eab\u4e00\u4e0b\u95ee\u9898\u67e5\u627e\u8fc7\u7a0b\u3002<\/p>\n<p><strong>\u4e00\u3001\u73b0\u573a\u91cd\u73b0<\/strong><\/p>\n<p>\u8fd9\u91cc\u501f\u7528\u4e00\u4e0b\u8fd9\u4f4d\u540c\u4e8b\u7684\u6d4b\u8bd5\u7a0b\u5e8f\u4ee5\u53ca\u90a3\u53f0\u673a\u5668\uff0c\u91cd\u73b0\u4e00\u4e0b\u95ee\u9898\u8fc7\u7a0b\uff1a<br \/>\n\/*test.c *\/<\/p>\n<p>\u2026<br \/>\n#include &lt;iconv.h&gt;<\/p>\n<p>int main(void)<br \/>\n{<br \/>\nint r;<br \/>\nchar *sin, *sout;<br \/>\nsize_t lenin, lenout;<br \/>\nchar *src = &#8220;\u4f60\u597d!&#8221;;<br \/>\nchar dst[256] = {0};<br \/>\niconv_t c_pt;<\/p>\n<p>sin = src;<br \/>\nlenin = strlen(src)+1;<\/p>\n<p>sout = dst;<br \/>\nlenout = 256;<\/p>\n<p>if ((c_pt = iconv_open(&#8220;UTF-8&#8221;, &#8220;GB2312&#8221;)) == (iconv_t)(-1)){<br \/>\nprintf(&#8220;iconv_open error!. errno[%d].\\n&#8221;, errno);<br \/>\nreturn -1;<br \/>\n}<\/p>\n<p>if ((r = iconv(c_pt, (char **)&amp;sin, &amp;lenin, &amp;sout, &amp;lenout)) != 0){<br \/>\nprintf(&#8220;iconv error!. errno[%d].\\n&#8221;, r);<br \/>\nreturn -1;<br \/>\n}<\/p>\n<p>iconv_close(c_pt);<\/p>\n<p>printf(&#8220;SRC[%s], DST[%s].\\n&#8221;, src, dst);<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p>\u6839\u636e\u4e4b\u524d\u7684\u7ecf\u9a8c\uff0c\u6211\u4eec\u6309\u5982\u4e0b\u547d\u4ee4\u7f16\u8bd1\u8be5\u7a0b\u5e8f\uff1a<\/p>\n<p>$&gt; gcc -g -o test test.c<\/p>\n<p>\/tmp\/ccyQ5blC.o: In function `main&#8217;:<br \/>\n\/home\/tonybai\/tmp\/test.c:28: undefined reference to `libiconv_open&#8217;<br \/>\n\/home\/tonybai\/tmp\/test.c:33: undefined reference to `libiconv&#8217;<br \/>\n\/home\/tonybai\/tmp\/test.c:38: undefined reference to `libiconv_close&#8217;<\/p>\n<p>\u54a6\uff0c\u8fd9\u662f\u548b\u641e\u7684\u5462\uff1f\u600e\u4e48\u627e\u4e0d\u5230iconv\u5e93\u7684\u7b26\u53f7\uff01\uff01\uff01\u663e\u5f0f\u52a0\u4e0aiconv\u7684\u94fe\u63a5\u6307\u793a\u518d\u8bd5\u8bd5\u3002<\/p>\n<p>$&gt; gcc -g -o test test.c -liconv<\/p>\n<p>\u8fd9\u56de\u7f16\u8bd1OK\u4e86\u3002\u7684\u786e\u5982\u90a3\u4f4d\u540c\u4e8b\u6240\u8bf4\u51fa\u73b0\u4e86\u602a\u5f02\u7684\u60c5\u51b5\u3002<\/p>\n<p><strong>\u4e8c\u3001\u73b0\u573a\u53d6\u8bc1<\/strong><\/p>\n<p>\u60ef\u6027\u601d\u7ef4\u8ba9\u6211<strong>\u9996\u5148<\/strong>\u63d0\u51fa\u7591\u95ee\uff1a\u96be\u9053\u662f\u8fd9\u53f0\u673a\u5668\u4e0a\u7684<a href=\"http:\/\/www.gnu.org\/s\/libc\/\" target=\"_blank\" rel=\"noopener\">libc<\/a>\u7248\u672c\u6709\u5dee\u5f02\uff0c\u68c0\u67e5\u4e00\u4e0b<a href=\"http:\/\/tonybai.com\/2009\/04\/11\/glibc-strlen-source-analysis\/\" target=\"_blank\" rel=\"noopener\">libc<\/a>\u4e2d\u662f\u5426\u5b9a\u4e49\u4e86iconv\u76f8\u5173\u7b26\u53f7\u3002<\/p>\n<p>$ nm \/lib64\/libc.so.6 |grep iconv<br \/>\n000000397141e040 T iconv<br \/>\n000000397141e1e0 T iconv_close<br \/>\n000000397141ddc0 T iconv_open<\/p>\n<p>iconv\u7684\u51fd\u6570\u90fd\u5b9a\u4e49\u4e86\u5440\uff01\u600e\u4e48\u4f1a\u94fe\u63a5\u4e0d\u5230\uff1f<\/p>\n<p>\u6211\u4eec<strong>\u518d\u6765<\/strong>\u770b\u770b\u5df2\u7ecf\u7f16\u8bd1\u6210\u529f\u7684\u90a3\u4e2atest\u5230\u5e95\u8fde\u63a5\u5230\u54ea\u4e2aiconv\u5e93\u4e86\u3002<\/p>\n<p>$ ldd test<br \/>\nlinux-vdso.so.1 =&gt;\u00a0 (0x00007fff77d6b000)<br \/>\nlibiconv.so.2 =&gt; \/usr\/local\/lib\/libiconv.so.2 (0x00002abbeb09e000)<br \/>\nlibc.so.6 =&gt; \/lib64\/libc.so.6 (0\u00d70000003971400000)<br \/>\n\/lib64\/ld-linux-x86-64.so.2 (0\u00d70000003971000000)<\/p>\n<p>\u54e6\uff0c\u7cfb\u7edf\u91cc\u5c45\u7136\u5728\/usr\/local\/lib\u4e0b\u9762\u5355\u72ec\u5b89\u88c5\u4e86\u4e00\u4efdlibiconv\u3002gcc\u663e\u7136\u662f\u94fe\u63a5\u5230\u8fd9\u91cc\u7684libiconv\u4e86\uff0c\u4f46gcc\u600e\u4e48\u4f1a\u94fe\u63a5\u5230\u8fd9\u91cc\u4e86\u5462\uff1f<\/p>\n<p><strong>\u4e09\u3001\u5927\u4fa6\u63a2\u7684\u5206\u6790^_^<\/strong><\/p>\n<p><a href=\"http:\/\/tonybai.com\/2006\/03\/14\/explain-gcc-warning-options-by-examples\/\" target=\"_blank\" rel=\"noopener\">Gcc<\/a>\u5230\u5e95\u505a\u4e86\u4ec0\u4e48\u5462\uff1f\u6211\u4eec\u770b\u770b\u5176verbose\u7684\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<p>$ gcc -g -o test test.c -liconv -v<br \/>\n\u4f7f\u7528\u5185\u5efa specs\u3002<br \/>\n\u76ee\u6807\uff1ax86_64-redhat-linux<br \/>\n\u914d\u7f6e\u4e3a\uff1a..\/configure \u2013prefix=\/usr \u2013mandir=\/usr\/share\/man \u2013infodir=\/usr\/share\/info \u2013enable-shared \u2013enable-threads=posix \u2013enable-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checking=release \u2013with-system-zlib \u2013enable-__cxa_atexit \u2013disable-libunwind-exceptions \u2013enable-libgcj-multifile \u2013enable-languages=c,c++,\u00a0\u00a0 objc,obj-c++,java,fortran,ada \u2013enable-java-awt=gtk \u2013disable-dssi \u2013disable-plugin \u2013with-java-home=\/usr\/lib\/jvm\/java-1.4.2-gcj-1.4.2.0\/jre \u2013with-cpu=generic \u2013host=x86_64-redhat-linux<br \/>\n\u7ebf\u7a0b\u6a21\u578b\uff1aposix<br \/>\ngcc \u7248\u672c 4.1.2 20080704 (Red Hat 4.1.2-50)<br \/>\n\/usr\/libexec\/gcc\/x86_64-redhat-linux\/4.1.2\/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=generic -auxbase test -g -version -o \/tmp\/\u00a0\u00a0\u00a0\u00a0 ccypZm0v.s<br \/>\n\u5ffd\u7565\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u201c\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/x86_64-redhat-linux\/include\u201d<br \/>\n#include &#8220;\u2026&#8221; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n#include &lt;\u2026&gt; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n\/usr\/local\/include<br \/>\n\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/include<br \/>\n\/usr\/include<br \/>\n\u641c\u7d22\u5217\u8868\u7ed3\u675f\u3002<br \/>\nGNU C \u7248\u672c 4.1.2 20080704 (Red Hat 4.1.2-50) (x86_64-redhat-linux)<br \/>\n\u7531 GNU C \u7248\u672c 4.1.2 20080704 (Red Hat 4.1.2-50) \u7f16\u8bd1\u3002<br \/>\nGGC \u51c6\u5219\uff1a\u2013param ggc-min-expand=100 \u2013param ggc-min-heapsize=131072<br \/>\nCompiler executable checksum: ef754737661c9c384f73674bd4e06594<br \/>\nas -V -Qy -o \/tmp\/ccaqvDgX.o \/tmp\/ccypZm0v.s<br \/>\nGNU assembler version 2.17.50.0.6-14.el5 (x86_64-redhat-linux) using BFD version 2.17.50.0.6-14.el5 20061020<br \/>\n\/usr\/libexec\/gcc\/x86_64-redhat-linux\/4.1.2\/collect2 \u2013eh-frame-hdr -m elf_x86_64 \u2013hash-style=gnu -dynamic-linker \/lib64\/ld-linux-x86-64.so.\u00a0 2 -o test \/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/lib64\/crt1.o \/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/lib64\/crti.o \/usr\/\u00a0\u00a0 lib\/gcc\/x86_64-redhat-linux\/4.1.2\/crtbegin.o -L\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2 -L\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2 -L\/usr\/lib\/gcc\/ x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/lib64 -L\/lib\/..\/lib64<br \/>\n-L\/usr\/lib\/..\/lib64 \/tmp\/ccaqvDgX.o -liconv -lgcc \u2013as-needed -lgcc_s \u2013no-as-needed -lc -lgcc \u2013as-needed -lgcc_s \u2013no-as-needed \/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/crtend.o \/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/lib64\/crtn.o<\/p>\n<p>\u4ece\u8fd9\u4e2a\u7ed3\u679c\u6765\u770b\uff0cgcc\u5728search iconv.h\u8fd9\u4e2a\u5934\u6587\u4ef6\u65f6\uff0c\u9996\u5148\u627e\u5230\u7684\u662f\/usr\/local\/include\/iconv.h\uff0c\u800c\u4e0d\u662f\/usr\/include\/iconv.h\u3002\u8fd9\u4e24\u4e2a\u6587\u4ef6\u6709\u5565\u4e0d\u540c\u4e48\uff1f<\/p>\n<p>\u5728\/usr\/local\/include\/iconv.h\u4e2d\uff0c\u6211\u627e\u5230\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>\u2026<br \/>\n#ifndef LIBICONV_PLUG<br \/>\n#define iconv_open libiconv_open<br \/>\n#endif<br \/>\nextern iconv_t iconv_open (const char* tocode, const char* fromcode);<br \/>\n\u2026<\/p>\n<p>libiconv_open vs iconv_open\uff0c\u5367\u69fd\uff01\uff01\uff01\u518d\u5bf9\u6bd4\u4e00\u4e0b\u524d\u9762\u7f16\u8bd1\u65f6\u8f93\u51fa\u7684\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n<p>\/tmp\/ccyQ5blC.o: In function `main&#8217;:<br \/>\n\/home\/tonybai\/tmp\/test.c:28: undefined reference to `libiconv_open&#8217;<br \/>\n\/home\/tonybai\/tmp\/test.c:33: undefined reference to `libiconv&#8217;<br \/>\n\/home\/tonybai\/tmp\/test.c:38: undefined reference to `libiconv_close&#8217;<\/p>\n<p>\u5927\u4fa6\u63a2\u9192\u609f\u4e86\uff01\u5927\u4fa6\u63a2\u5e26\u4f60\u8fd8\u539f\u4e00\u4e0b\u771f\u5b9e\u60c5\u51b5\u3002<\/p>\n<p>\u6211\u4eec\u5728\u6267\u884cgcc -g -o test test.c\u65f6\uff0c \u6839\u636egcc -v\u4e2dinclude search dir\u7684\u987a\u5e8f\uff0cgcc\u9996\u5148search\u5230\u7684\u662f\/usr\/local\/include\/iconv.h\uff0c\u800c\u8fd9\u91cciconv_open\u7b49\u51fd\u6570\u88ab\u9884\u7f16\u8bd1\u5668\u66ff\u6362\u6210 \u4e86libiconv_open\u7b49\u52a0\u4e0a\u4e86lib\u524d\u7f00\u7684\u51fd\u6570\uff0c\u800c\u8fd9\u4e9b\u51fd\u6570\u7b26\u53f7\u663e\u7136\u5728libc\u4e2d\u662f\u65e0\u6cd5\u627e\u5230\u7684\uff0clibc\u4e2d\u53ea\u6709\u4e0d\u5e26lib\u524d\u7f00\u7684 iconv_open\u7b49\u51fd\u6570\u7684\u5b9a\u4e49\u3002\u5927\u4fa6\u63a2\u4e5f\u662f\u4e00\u65f6\u773c\u62d9\u4e86\uff0c\u6ca1\u6709\u7ec6\u81f4\u67e5\u770bgcc\u7684\u7f16\u8bd1\u9519\u8bef\u4fe1\u606f\u4e2d\u7684\u5185\u5bb9\uff0c\u8fd9\u5c31\u662f\u95ee\u9898\u6240\u5728\uff01<\/p>\n<p>\u800cgcc -g -o test test.c -liconv\u4e3a\u4f55\u53ef\u4ee5\u987a\u5229\u7f16\u8bd1\u901a\u8fc7\u5462\uff1fgcc\u662f\u5982\u4f55\u627e\u5230\/usr\/local\/lib\u4e0b\u7684libiconv\u7684\u5462\uff1f\u5927\u4fa6\u63a2\u518d\u6b21\u4e3a\u5927\u5bb6\u8fd8\u539f\u4e00\u4e0b\u771f\u76f8\u3002<\/p>\n<p>\u6211\u4eec\u5728\u6267\u884cgcc -g -o test test.c -liconv\u65f6\uff0cgcc\u540c \u6837\u9996\u5148search\u5230\u7684\u662f\/usr\/local\/include\/iconv.h\uff0c\u7136\u540e\u7f16\u8bd1test.c\u6e90\u7801\uff0cok\uff1b\u63a5\u4e0b\u6765\u542f\u52a8ld\u7a0b\u5e8f\u8fdb\u884c\u94fe\u63a5\uff1bld\u627e \u5230\u4e86libiconv\uff0cld\u662f\u600e\u4e48\u627e\u5230iconv\u7684\u5462\uff0clibiconv\u5728\/usr\/local\/lib\u4e0b\uff0cld\u663e\u7136\u662f\u5230\u8fd9\u4e2a\u76ee\u5f55\u4e0bsearch\u4e86\u3002\u6211\u4eec \u901a\u8fc7\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u53ef\u4ee5\u77e5\u6653ld\u7684\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84\uff1a<\/p>\n<p>$&gt; ld -verbose|grep SEARCH<br \/>\nSEARCH_DIR(&#8220;\/usr\/x86_64-redhat-linux\/lib64&#8221;); SEARCH_DIR(&#8220;\/usr\/local\/lib64&#8221;); SEARCH_DIR(&#8220;\/lib64&#8221;); SEARCH_DIR(&#8220;\/usr\/lib64&#8221;); SEARCH_DIR(&#8220;\/usr\/x86_64-redhat-linux\/lib&#8221;); SEARCH_DIR(&#8220;\/usr\/lib64&#8221;); SEARCH_DIR(&#8220;\/usr\/local\/lib&#8221;); SEARCH_DIR(&#8220;\/lib&#8221;); SEARCH_DIR(&#8220;\/usr\/lib&#8221;);<\/p>\n<p>ld\u7684\u9ed8\u8ba4search\u8def\u5f84\u4e2d\u6709\/usr\/local\/lib(\u6211\u4e4b\u524d\u4e00\u76f4\u662f\u4ee5\u4e3a\/usr\/local\/lib\u4e0d\u662fgcc\/ld\u7684\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84\u7684)\uff0c\u56e0\u6b64\u627e\u5230libiconv\u5c31\u4e0d\u8db3\u4e3a\u5947\u4e86\u3002<\/p>\n<p><strong>\u56db\u3001\u95ee\u9898\u89e3\u51b3<\/strong><\/p>\n<p>\u6211\u4eec\u4e0d\u60f3\u663e\u5f0f\u7684\u52a0\u4e0a-liconv\uff0c\u90a3\u5982\u4f55\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u5462\uff1f\u6211\u4eec\u662f\u5426\u53ef\u4ee5\u5f3a\u5236gcc\u5148\u627e\u5230\/usr\/include\/iconv.h\u5462\uff1f\u6211\u4eec\u5148\u6765\u505a\u4e2a\u8bd5\u9a8c\u3002<\/p>\n<p>$ gcc -g -o test test.c -liconv -I ~\/include -v<br \/>\n\u2026<br \/>\n\u5ffd\u7565\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u201c\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/x86_64-redhat-linux\/include\u201d<br \/>\n#include &#8220;\u2026&#8221; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n#include &lt;\u2026&gt; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n<strong>\/home\/tonybai\/include<\/strong><br \/>\n\/usr\/local\/include<br \/>\n\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/include<br \/>\n\/usr\/include<br \/>\n\u641c\u7d22\u5217\u8868\u7ed3\u675f\u3002<\/p>\n<p>\u2026<\/p>\n<p>\u8bd5\u9a8c\u7ed3\u679c\u4f3c\u4e4e\u8ba9\u6211\u4eec\u89c9\u5f97\u53ef\u884c\uff0c\u6211\u4eec\u901a\u8fc7-I\u6307\u5b9a\u7684\u8def\u5f84\u88ab\u653e\u5728\u4e86\u7b2c\u4e00\u7684\u4f4d\u7f6e\u8fdb\u884csearch\u3002\u6211\u4eec\u6765\u5c1d\u8bd5\u4e00\u4e0b\u5f3a\u5236gcc\u5148search \/usr\/include\u3002<\/p>\n<p>$ gcc -g -o test test.c -I ~\/include -v<br \/>\n\u2026<br \/>\n\u5ffd\u7565\u4e0d\u5b58\u5728\u7684\u76ee\u5f55\u201c\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/..\/..\/..\/..\/x86_64-redhat-linux\/include\u201d<br \/>\n\u5ffd\u7565\u91cd\u590d\u7684\u76ee\u5f55\u201c\/usr\/include\u201d<br \/>\n\u56e0\u4e3a\u5b83\u662f\u4e00\u4e2a\u91cd\u590d\u4e86\u7cfb\u7edf\u76ee\u5f55\u7684\u975e\u7cfb\u7edf\u76ee\u5f55<br \/>\n#include &#8220;\u2026&#8221; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n#include &lt;\u2026&gt; \u641c\u7d22\u4ece\u8fd9\u91cc\u5f00\u59cb\uff1a<br \/>\n\/usr\/local\/include<br \/>\n\/usr\/lib\/gcc\/x86_64-redhat-linux\/4.1.2\/include<br \/>\n\/usr\/include<br \/>\n\u641c\u7d22\u5217\u8868\u7ed3\u675f\u3002<br \/>\n\u2026<\/p>\n<p>\u7cdf\u7cd5\uff01\/usr\/include\u88ab\u5ffd\u7565\u4e86\uff01\u8fd8\u662f\u4ece\/usr\/local\/include\u5f00\u59cb\uff0c\u65b9\u6848\u5931\u8d25\u3002<\/p>\n<p>\u4f3c\u4e4e\u5269\u4e0b\u7684\u552f\u4e00\u65b9\u6848\u5c31\u662f\u5c06\/usr\/local\/lib\u4e0b\u7684\u90a3\u4efdlibiconv\u5378\u8f7d\u6389\uff01\u90a3\u5c31\u8fd9\u4e48\u505a\u5427^_^\uff01<\/p>\n<\/div>\n<\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>2017\u5e7401\u670820\u65e5 16:13:35<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[],"tags":[118],"class_list":["post-1392","post","type-post","status-publish","format-standard","hentry","tag-02-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=1392"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/1392\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=1392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=1392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=1392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}