{"id":2840,"date":"2016-09-18T13:58:31","date_gmt":"2016-09-18T05:58:31","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2840"},"modified":"2016-09-18T13:58:31","modified_gmt":"2016-09-18T05:58:31","slug":"linux%e4%b8%8b%e4%b8%bagcc%e6%b7%bb%e5%8a%a0%e5%a4%b4%e6%96%87%e4%bb%b6%e7%9a%84%e6%90%9c%e7%b4%a2%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2840.html","title":{"rendered":"Linux\u4e0b\u4e3agcc\u6dfb\u52a0\u5934\u6587\u4ef6\u7684\u641c\u7d22\u8def\u5f84"},"content":{"rendered":"<p>=Start=<\/p>\n<h4>\u7f18\u7531\uff1a<\/h4>\n<p>\u5728Linux\u73af\u5883\u4e2d\u7f16\u8bd1\u5b89\u88c5\u8f6f\u4ef6\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u78b0\u5230\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u7684\u9519\u8bef\uff1a<\/p>\n<blockquote><p>sipAPIQtCore.h:33:17: \u9519\u8bef\uff1asip.h\uff1a\u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55<\/p><\/blockquote>\n<p>\u62a5\u8fd9\u4e2a\u9519\u8bef\u662f\u56e0\u4e3agcc\u6ca1\u6709\u5728\u9ed8\u8ba4\u7684\u641c\u7d22\u8def\u5f84\u4e0b\u627e\u5230\u5bf9\u5e94\u7684\u6587\u4ef6\uff0c\u8fd9\u65f6\uff0c\u4f60\u9700\u8981\u624b\u52a8\u4e3agcc\u6307\u5b9a\u5934\u6587\u4ef6\/\u5e93\u6587\u4ef6\u7684\u641c\u7d22\u8def\u5f84\uff08\u524d\u63d0\u662f\u6709\u5bf9\u5e94\u7684\u6587\u4ef6\uff09\uff0c\u624d\u80fd\u987a\u5229\u5b8c\u6210\u7f16\u8bd1\u5b89\u88c5\u3002<\/p>\n<p>\u5728\u6b64\u8bb0\u5f55\u4e00\u4e0b\u89e3\u51b3\u529e\u6cd5\uff0c\u65b9\u4fbf\u4ee5\u540e\u53c2\u8003\u3002<\/p>\n<h4>\u6b63\u6587\uff1a<\/h4>\n<h5>\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n<h6>\u65b9\u6cd5\u4e00\uff08\u73af\u5883\u53d8\u91cf\uff09\uff1a<\/h6>\n<pre class=\"lang:default decode:true\">export CPLUS_INCLUDE_PATH=\/usr\/local\/include\/python2.7:$CPLUS_INCLUDE_PATH\nexport C_INCLUDE_PATH=\/usr\/local\/include\/python2.7:$C_INCLUDE_PATH<\/pre>\n<h6>\u65b9\u6cd5\u4e8c\uff08\u7f16\u8bd1\u9009\u9879\uff09\uff1a<\/h6>\n<p>\u4e3agcc\u6dfb\u52a0\u300c-I dir\u300d\u9009\u9879\uff08\u53ef\u4ee5\u901a\u8fc7\u591a\u4e2a\u300c-I dir\u300d\u7684\u5f62\u5f0f\u6dfb\u52a0\u591a\u4e2a\u76ee\u5f55\u81f3\u641c\u7d22\u8def\u5f84\u5217\u8868\uff09\uff0c\u5c06\u6307\u5b9a\u7684\u76ee\u5f55\u6dfb\u52a0\u5230\u5934\u6587\u4ef6\u641c\u7d22\u8def\u5f84\u5217\u8868\u4e2d\u53bb\u3002<\/p>\n<h6>\u65b9\u6cd5\u4e09\uff08\u4e0d\u5efa\u8bae\uff09\uff1a<\/h6>\n<p>\u5c06\u9700\u8981\u7684\u6240\u6709\u5934\u6587\u4ef6\u62f7\u8d1d\u5230\u9ed8\u8ba4\u7684\u641c\u7d22\u76ee\u5f55\u4e0b\u4e5f\u53ef\u4ee5\u5b8c\u6210\u7f16\u8bd1\uff0c\u4f46\u8fd9\u53ef\u80fd\u4f1a\u6539\u53d8\u7cfb\u7edf\u9ed8\u8ba4\u7684\u5934\u6587\u4ef6\u5185\u5bb9\uff0c\u6240\u4ee5\u4e0d\u63a8\u8350\u8fd9\u79cd\u300c\u996e\u9e29\u6b62\u6e34\u300d\u7684\u65b9\u5f0f\u3002<\/p>\n<p>==<\/p>\n<pre class=\"lang:default decode:true\">#\u6dfb\u52a0.so\u641c\u7d22\u8def\u5f84\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\/path\/to\/lib\n\n#\u6dfb\u52a0.a\u641c\u7d22\u8def\u5f84\nLIBRARY_PATH=$LIBRARY_PATH:\/path\/to\/lib\n\n#\u6dfb\u52a0bin\u641c\u7d22\u8def\u5f84\nexport PATH=$PATH:\/path\/to\/bin\n\n#\u6dfb\u52a0GCC\u7684include\u6587\u4ef6\u641c\u7d22\u8def\u5f84\nexport C_INCLUDE_PATH=$C_INCLUDE_PATH:\/path\/to\/include\n\n#\u6dfb\u52a0G++\u7684include\u6587\u4ef6\u641c\u7d22\u8def\u5f84\nexport CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:\/path\/to\/include<\/pre>\n<p>==<\/p>\n<p>\u5f53\u73af\u5883\u53d8\u91cf\u548c\u547d\u4ee4\u884c\u9009\u9879\u88ab\u540c\u65f6\u4f7f\u7528\u65f6\uff0c\u7f16\u8bd1\u5668\u6309\u4e0b\u9762\u7684\u6b21\u5e8f\u641c\u7d22\u76ee\u5f55\uff1a<\/p>\n<ol>\n<li>\u4ece\u5de6\u5230\u53f3\u641c\u7d22\u7531\u547d\u4ee4\u884c\u300c-I\u300d\u548c\u300c-L\u300d\u6307\u5b9a\u7684\u76ee\u5f55\uff1b<\/li>\n<li>\u7531\u73af\u5883\u53d8\u91cf\uff0c\u6bd4\u5982\u300cC_INCLUDE_PATH\u300d\u3001\u300cCPLUS_INCLUDE_PATH\u300d\u548c\u300cLIBRARY_PATH\u300d\u6307\u5b9a\u7684\u76ee\u5f55\uff1b<\/li>\n<li>\u9ed8\u8ba4\u7684\u7cfb\u7edf\u76ee\u5f55\u3002<\/li>\n<\/ol>\n<h5>\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n<ul>\n<li><a href=\"http:\/\/blog.chinaunix.net\/uid-17240700-id-2813913.html\" target=\"_blank\">Linux\u4e0bgcc\u7f16\u8bd1\u4e2d\u5173\u4e8e\u5934\u6587\u4ef6\u4e0e\u5e93\u6587\u4ef6\u641c\u7d22\u8def\u5f84\u76f8\u5173\u95ee\u9898<\/a><\/li>\n<li><a href=\"http:\/\/wdqfirst.blog.163.com\/blog\/static\/1133474112012108114838299\/\" target=\"_blank\">gcc\u6307\u5b9a\u5934\u6587\u4ef6\u8def\u5f84\u53ca\u52a8\u6001\u94fe\u63a5\u5e93\u8def\u5f84<\/a><\/li>\n<li><a href=\"http:\/\/blog.csdn.net\/cppresearcher\/article\/details\/7734497\" target=\"_blank\">C_INCLUDE_PATH\uff0cCPLUS_INCLUDE_PATH\u548cLIBRARY_PATH\u7684\u7528\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/www.coder4.com\/archives\/2100\" target=\"_blank\">Linux\u4e0binclude\/lib\/bin\u7b49\u641c\u7d22\u8def\u5f84\u7684\u914d\u7f6e<\/a><\/li>\n<li><a href=\"http:\/\/hbprotoss.github.io\/posts\/linuxxia-bian-yi-lian-jie-dong-tai-ku.html\" target=\"_blank\">Linux\u4e0b\u7f16\u8bd1\u94fe\u63a5\u52a8\u6001\u5e93<\/a><\/li>\n<\/ul>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u5728Linux\u73af\u5883\u4e2d\u7f16\u8bd1\u5b89\u88c5\u8f6f\u4ef6\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u78b0\u5230\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u7684\u9519\u8bef\uff1a sipAPIQtC [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11,7],"tags":[650,651,450,30],"class_list":["post-2840","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-programing","tag-c_include_path","tag-cplus_include_path","tag-gcc","tag-linux"],"views":6556,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2840"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2840\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}