{"id":392,"date":"2019-09-21T18:47:51","date_gmt":"2019-09-21T10:47:51","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=392"},"modified":"2021-01-07T17:10:06","modified_gmt":"2021-01-07T09:10:06","slug":"protobuf2-4-1%e7%94%a8vc2013%e7%bc%96%e8%af%91%e6%8a%a5%e9%94%99%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=392","title":{"rendered":"[Unity]\u4f7f\u7528Lua\u7248Protobuf"},"content":{"rendered":"\n<p class=\"has-text-color has-luminous-vivid-amber-color\">protobuf2.4.1\u7528VC2013\u7f16\u8bd1\u62a5\u9519\u89e3\u51b3<br><\/p>\n\n\n\n<p>1\u3001\u5728common.h\u4e2d #include &lt;algorithm&gt;<br>\u6216\u8005\u5728 message.cc \u4e2d \u6dfb\u52a0 #include&lt;string&gt;, #include&lt;iostream&gt;<\/p>\n\n\n\n<p>2\u3001proto_path_.push_back(make_pair(virtual_path, disk_path));<br>\u539f\u56e0\uff1a<a href=\"https:\/\/stackoverflow.com\/questions\/32443181\/stdmake-pair-with-c-11\">C++11\u4e0d\u9700\u8981\u663e\u5f0f\u6307\u5b9amake_pair\u4e86<\/a><\/p>\n\n\n\n<p>3\u3001\u53ef\u80fd\u9700\u8981\u6dfb\u52a0 _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS \u5b8f<br><br>\u5b89\u88c5lua-protobuf-master<br>\u8fdbprotobuf-2.4.1\u76ee\u5f55<br>\u628aprotoc.exe\u653e\u5230 protobuf2.4.1\/src\u76ee\u5f55\u4e2d<br><br>\u4ee5\u4e0a\u6b65\u9aa4\u5df2\u96c6\u6210\u5230ProtoBuild.zip\u5305\u4e2d<\/p>\n\n\n\n<p>\u8fdb protobuf2.4.1\/python\u76ee\u5f55\u4e2d<br>python setup.py build <br>python setup.py install <\/p>\n\n\n\n<p>\u4ee5\u4e0b\u4e3a\u4e00\u952e\u6253\u5305\u5668\uff0c\u4f46\u662f\u8981\u914d\u7f6epython\u73af\u5883<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2019\/09\/ProtoBuild.zip.tar\">ProtoBuild.zip<\/a><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2019\/09\/ProtoBuild.zip.tar\" class=\"wp-block-file__button\" download>\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2019\/09\/protobuf-2.4.1.zip.tar\">protobuf-2.4.1.zip<\/a><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2019\/09\/protobuf-2.4.1.zip.tar\" class=\"wp-block-file__button\" download>\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6700\u65b0\u66f4\u65b0\uff1a<\/p>\n\n\n\n<p>VC2019\u8fd0\u884c\u5e93\u4e0b\u8f7d\uff1a<br><a href=\"https:\/\/aka.ms\/vs\/16\/release\/vc_redist.x64.exe\">https:\/\/aka.ms\/vs\/16\/release\/vc_redist.x64.exe<\/a><\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/05\/protoc.zip\">protoc( VC++2019 )<\/a><a href=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/05\/protoc.zip\" class=\"wp-block-file__button\" download>\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>\u5728\u67d0\u4e9bWindows\u5e73\u53f0\u4e0b\u53ef\u80fd\u4f1a\u6709\u517c\u5bb9\u95ee\u9898\uff0c\u5219\u53ef\u4ee5\u7f16\u8bd1\/MT\u7248\u672c\uff08\u4e0d\u662f\/MD\u7248\u672c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>protobuf2.4.1\u7528VC2013\u7f16\u8bd1\u62a5\u9519\u89e3\u51b3 1\u3001\u5728common.h\u4e2d #include &lt;al [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[18],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/392"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=392"}],"version-history":[{"count":14,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":3497,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/392\/revisions\/3497"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}