{"id":293384,"date":"2021-01-19T07:08:55","date_gmt":"2021-01-18T23:08:55","guid":{"rendered":"http:\/\/4563.org\/?p=293384"},"modified":"2021-01-19T07:08:55","modified_gmt":"2021-01-18T23:08:55","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-bazel-%e7%9a%84-lib-%e6%96%87%e4%bb%b6%e4%b8%ad%e5%ae%9a%e4%b9%89%e7%9a%84%e7%b1%bb","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=293384","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 bazel \u7684 lib \u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u7c7b"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5982\u4f55\u4f7f\u7528 bazel \u7684 lib \u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u7c7b               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : going2think <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5927\u5bb6\u597d\uff0c\u6709\u4e2a\u95ee\u9898\u8bf7\u6559\u4e0b \u6211\u73b0\u5728\u662f\u6709\u4e2a\u7c7b\u5b9a\u4e49\u5728 bazel \u7684 lib \u4e2d\uff0c\u60f3\u5728 vs \u91cc\u9762\u8c03\u7528\uff0c\u6709\u4ec0\u4e48\u65b9\u6cd5\u5417\uff0c<\/p>\n<p>lib \u7c7b\u5b9a\u4e49\uff1a<\/p>\n<pre><code>\/\/ print_class.cpp  #include &lt;iostream&gt;  class PrintClass {     public:     void print_words() {         std::cout &lt;&lt; \"============== this is the print===========\" &lt;&lt; std::endl;     } }; <\/code><\/pre>\n<p>\u8fd9\u4e2a cpp \u6587\u4ef6\u901a\u8fc7 bazel \u7f16\u8bd1\u4f1a\u5f97\u5230\u4e00\u4e2a .lib \u6587\u4ef6\uff0c\u540e\u9762\u5e0c\u671b\u8c03\u7528\u8fd9\u4e2a.lib \u6587\u4ef6\u6765\u8c03\u7528 PrintClass<\/p>\n<p>vs \u91cc\u9762\u8c03\u7528\u4ee3\u7801<\/p>\n<pre><code>\/\/ main.cpp  \/\/ \u5982\u4f55\u901a\u8fc7.lib \u6587\u4ef6\u5f15\u5165 PrintClass?? int main() {     PrintClass pc = PrintClass();     pc.print_words(); } <\/code><\/pre>\n<p>\u8fd9\u91cc\u6ca1\u6cd5 include \u4e0a\u9762\u7684 print_class.cpp \u6587\u4ef6\uff0c\u56e0\u4e3a\u5728 vs \u91cc\u9762\u7f16\u8bd1\u901a\u4e0d\u8fc7\uff0c\u53ea\u6709\u901a\u8fc7 bazel \u7f16\u8bd1\u6210 lib \u6765\u8c03\u7528<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5028554\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ai277014717 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63d0\u4f9b header \u662f\u4ee3\u7801\u53ef\u4ee5\u901a\u8fc7\u7f16\u8bd1\u3002\u94fe\u63a5\u8fc7\u7a0b\u628a.lib \u94fe\u63a5\u8fdb\u53bb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5028555\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : edimetia3d <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             java \u8f6c\u884c\u7684\u5417? C++\u4e0d\u80fd\u8fd9\u4e48\u7528,\u5173\u952e\u8bcd&#8221;\u5934\u6587\u4ef6&#8221;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5028556\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : neoblackcap <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             include \u5934\u6587\u4ef6\u5373\u53ef\u5b9e\u73b0\u5916\u90e8\u5e93\u7684\u5f15\u5165\u3002\u4e0d\u8fc7\u4f60\u8981\u641e\u6e05\u695a\u8fd9\u4e2a\u5e93\u5230\u5e95\u662f C++ \u5e93\u8fd8\u662f C \u5e93\u3002<br \/>\u5982\u679c\u662f C++\u7684\uff0c\u90a3\u4e48\u8bf7\u5c06\u4f60\u7684\u7f16\u8bd1\u5668\u4fdd\u6301\u5728\u8ddf\u5176\u5e93\u4e00\u6837\u7684\u7248\u672c\uff0c\u5426\u5219\u8bf7\u81ea\u6c42\u591a\u798f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528 bazel \u7684 lib &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/293384"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293384"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/293384\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293384"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}