{"id":1269,"date":"2022-04-20T00:10:37","date_gmt":"2022-04-19T16:10:37","guid":{"rendered":"https:\/\/blog.cauchyschwarz.com\/?p=1269"},"modified":"2022-04-20T00:12:11","modified_gmt":"2022-04-19T16:12:11","slug":"windows%e4%b8%8bandroidstudio%e8%81%94%e7%bc%96c%e9%a1%b9%e7%9b%ae%e8%b8%a9%e5%9d%91","status":"publish","type":"post","link":"https:\/\/blog.cauchyschwarz.com\/?p=1269","title":{"rendered":"Windows\u4e0bAndroidStudio\u8054\u7f16C++\u9879\u76ee\u8e29\u5751"},"content":{"rendered":"\n<p>1.\u7f16\u8bd1\u7684\u6e90\u6587\u4ef6\u6570\u91cf\u8fc7\u591a\uff0c\u5355\u4e2a\u6e90\u6587\u4ef6\u7684\u8def\u5f84\u592a\u957f\uff0c\u5bfc\u81f4\u7f16\u8bd1\u547d\u4ee4\u7684\u957f\u5ea6\u8d85\u8fc7\u4e86windows\u547d\u4ee4\u7684\u957f\u5ea6\u9650\u5236\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u9700\u8981\u8bbe\u7f6eAndroid.mk\u91cc\u7684LOCAL_SHORT_COMMANDS\u548cApplication.mk\u91cc\u7684APP_SHORT_COMMANDS\u4e3atrue\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u6b64\u529f\u80fd\u5728 Windows \u4e0a\u53ef\u80fd\u5f88\u6709\u7528\uff0c\u5728 Windows \u4e0a\uff0c\u547d\u4ee4\u884c\u6700\u591a\u53ea\u63a5\u53d7 8191 \u4e2a\u5b57\u7b26\uff0c\u8fd9\u5bf9\u4e8e\u590d\u6742\u7684\u9879\u76ee\u6765\u8bf4\u53ef\u80fd\u592a\u5c11\u3002\u5b83\u8fd8\u4f1a\u5f71\u54cd\u4e2a\u522b\u6e90\u6587\u4ef6\u7684\u7f16\u8bd1\uff0c\u800c\u4e14\u5c06\u51e0\u4e4e\u6240\u6709\u7f16\u8bd1\u5668\u6807\u8bb0\u90fd\u653e\u5728\u5217\u8868\u6587\u4ef6\u5185\u3002<\/p><\/blockquote>\n\n\n\n<p>https:\/\/developer.android.com\/ndk\/guides\/android_mk#local_short_commands <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>2.ndk16\u7248\u672cclang++\u65e0\u6cd5\u6b63\u786e\u5904\u7406windows\u8def\u5f84\u5206\u9694\u7b26<\/p>\n\n\n\n<p>\u5728\u540c\u65f6\u4f7f\u7528BUILD_SHARED_LIBRARY\u548cAPP_SHORT_COMMANDS\/LOCAL_SHORT_COMMANDS\u65f6\uff0c\u5728\u6700\u7ec8\u94fe\u63a5\u751f\u6210so\u5e93\u8fd9\u4e00\u6b65\u65f6\uff0cclang++\u53ef\u80fd\u4f1a\u62a5\u9519\u65e0\u6cd5\u627e\u5230\u76f8\u5e94\u7684.o\u6587\u4ef6\u6216\u8005\u5176\u4ed6.a\u6587\u4ef6\u3002\u56e0\u4e3andk\u5728\u751f\u6210linker-list\u8fd9\u4e00\u6b65\u65f6\u6ca1\u6709\u6b63\u786e\u5904\u7406\u8def\u5f84\u5206\u9694\u7b26&#8221;\\\\&#8221;\uff0c\u5bfc\u81f4\u5bf9\u4e8e\u4e00\u4e2a&#8221;C:\\Users\\tom\\xxx.o&#8221;\u8fd9\u6837\u7684\u8def\u5f84\u94fe\u63a5\u65f6\u4f1a\u8bc6\u522b\u6210&#8221;C:Userstomxxx.o&#8221;\u8fd9\u6837\u7684\u8def\u5f84\uff0c\u628a\u8def\u5f84\u5206\u9694\u7b26\u5403\u6389\uff0c\u6700\u540eclang++\u8868\u793a\u65e0\u6cd5\u627e\u5230\u8def\u5f84\u5bf9\u5e94\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u8be6\u7ec6\u63cf\u8ff0\u89c1github\u4e0a\u7684issue\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/android\/ndk\/issues\/986\">https:\/\/github.com\/android\/ndk\/issues\/986<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/android\/ndk\/issues\/213\">https:\/\/github.com\/android\/ndk\/issues\/213<\/a><\/p>\n\n\n\n<p>\u89e3\u51b3\u529e\u6cd5\uff1a<\/p>\n\n\n\n<p>a.\u4f7f\u7528\u66f4\u9ad8\u7248\u672c\u6ca1\u6709\u8fd9\u4e2abug\u7684ndk\uff0c\u4e5f\u5c31\u662fndk21\uff1b<\/p>\n\n\n\n<p>b.\u624b\u52a8\u4fee\u590d\u8fd9\u4e2aBUG\uff0c\u6309\u7167\u8fd9\u4e2a\u63d0\u4ea4https:\/\/android-review.googlesource.com\/c\/platform\/ndk\/+\/1126440 \uff0c\u4fee\u6539build-binary.mk\u91cc\u7684<a href=\"https:\/\/android-review.googlesource.com\/c\/platform\/ndk\/+\/1126440\/1\/build\/core\/build-binary.mk\">\u90a3\u4e00\u884c<\/a>\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u7f16\u8bd1\u7684\u6e90\u6587\u4ef6\u6570\u91cf\u8fc7\u591a\uff0c\u5355\u4e2a\u6e90\u6587\u4ef6\u7684\u8def\u5f84\u592a\u957f\uff0c\u5bfc\u81f4\u7f16\u8bd1\u547d\u4ee4\u7684\u957f\u5ea6\u8d85\u8fc7\u4e86windows\u547d\u4ee4\u7684\u957f\u5ea6\u9650\u5236\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u9700\u8981\u8bbe\u7f6eAndroid.mk\u91cc\u7684LOCAL_SHORT_COMMANDS\u548cApplica&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[50,145],"class_list":["post-1269","post","type-post","status-publish","format-standard","hentry","category-10","tag-android","tag-ndk"],"_links":{"self":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/1269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1269"}],"version-history":[{"count":4,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/1269\/revisions"}],"predecessor-version":[{"id":1273,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=\/wp\/v2\/posts\/1269\/revisions\/1273"}],"wp:attachment":[{"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cauchyschwarz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}