{"id":726,"date":"2020-07-10T14:09:30","date_gmt":"2020-07-10T06:09:30","guid":{"rendered":"http:\/\/122.152.205.50\/wordpress\/?p=726"},"modified":"2022-10-22T14:34:16","modified_gmt":"2022-10-22T06:34:16","slug":"%e8%ae%b0%e4%b8%80%e6%ac%a1linux%e4%b8%8ac%e9%a1%b9%e7%9b%ae%e7%a7%bb%e6%a4%8d%e5%88%b0mac%e4%b8%8a%e7%bc%96%e8%af%91%e7%9a%84%e7%bb%8f%e5%8e%86","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=726","title":{"rendered":"\u8bb0\u4e00\u6b21Linux\u4e0aC++\u9879\u76ee\u79fb\u690d\u5230Mac\u4e0a\u7f16\u8bd1\u7684\u7ecf\u5386"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E6%88%91%E7%9A%84Mac%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83\" title=\"\u6211\u7684Mac\u7f16\u8bd1\u73af\u5883\">\u6211\u7684Mac\u7f16\u8bd1\u73af\u5883<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#1%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F\" title=\"1.\u64cd\u4f5c\u7cfb\u7edf\">1.\u64cd\u4f5c\u7cfb\u7edf<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#2%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83\" title=\"2.\u7f16\u8bd1\u73af\u5883\">2.\u7f16\u8bd1\u73af\u5883<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#1make\" title=\"1)make\">1)make<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#2gccg\" title=\"2)gcc\/g++\">2)gcc\/g++<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E5%8E%9F%E5%A7%8B%E9%A1%B9%E7%9B%AE%E6%A6%82%E5%86%B5\" title=\"\u539f\u59cb\u9879\u76ee\u6982\u51b5\">\u539f\u59cb\u9879\u76ee\u6982\u51b5<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#Mac%E4%B8%8A%E7%BC%96%E8%AF%91%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98\" title=\"Mac\u4e0a\u7f16\u8bd1\u51fa\u73b0\u7684\u95ee\u9898\">Mac\u4e0a\u7f16\u8bd1\u51fa\u73b0\u7684\u95ee\u9898<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E9%97%AE%E9%A2%981%EF%BC%9A%E6%89%BE%E4%B8%8D%E5%88%B0opensslsslh%E6%96%87%E4%BB%B6\" title=\"\u95ee\u98981\uff1a\u627e\u4e0d\u5230openssl\/ssl.h\u6587\u4ef6\">\u95ee\u98981\uff1a\u627e\u4e0d\u5230openssl\/ssl.h\u6587\u4ef6<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E9%97%AE%E9%A2%982%EF%BC%9Aerror_expected_expression\" title=\"\u95ee\u98982\uff1aerror: expected expression[]()\">\u95ee\u98982\uff1aerror: expected expression[]()<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E9%97%AE%E9%A2%983%EF%BC%9Agcc_6%E6%96%B0%E5%A2%9E%E7%BC%96%E8%AF%91%E8%AD%A6%E5%91%8A\" title=\"\u95ee\u98983\uff1agcc 6\u65b0\u589e\u7f16\u8bd1\u8b66\u544a\">\u95ee\u98983\uff1agcc 6\u65b0\u589e\u7f16\u8bd1\u8b66\u544a<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E9%97%AE%E9%A2%984%EF%BC%9A%E8%AF%AD%E6%B3%95%E8%A7%84%E8%8C%83%E7%9A%84%E9%97%AE%E9%A2%98\" title=\"\u95ee\u98984\uff1a\u8bed\u6cd5\u89c4\u8303\u7684\u95ee\u9898\">\u95ee\u98984\uff1a\u8bed\u6cd5\u89c4\u8303\u7684\u95ee\u9898<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=726\/#%E9%97%AE%E9%A2%985%EF%BC%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E6%89%BE%E4%B8%8D%E5%88%B0key_t\" title=\"\u95ee\u98985\uff1a\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\u627e\u4e0d\u5230key_t\">\u95ee\u98985\uff1a\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\u627e\u4e0d\u5230key_t<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E6%88%91%E7%9A%84Mac%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83\"><\/span>\u6211\u7684Mac\u7f16\u8bd1\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F\"><\/span>1.\u64cd\u4f5c\u7cfb\u7edf<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/07\/E9B7E611-DAA4-41B3-A269-F4C16F240BF4.png\" alt=\"img\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83\"><\/span>2.\u7f16\u8bd1\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"1make\"><\/span>1)make<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>GNU Make 3.81 (\u8f93\u5165make --version)<\/p>\n<h4><span class=\"ez-toc-section\" id=\"2gccg\"><\/span>2)gcc\/g++<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Apple clang version 11.0.3 (clang-1103.0.32.59)<\/p>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/07\/05D1C047-F92B-470C-B939-FCABF4604350.png\" alt=\"img\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E5%8E%9F%E5%A7%8B%E9%A1%B9%E7%9B%AE%E6%A6%82%E5%86%B5\"><\/span>\u539f\u59cb\u9879\u76ee\u6982\u51b5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5728Linux\u4e0a\u4f7f\u7528NetBeans\u7f16\u8f91\u5668\u521b\u5efa\u7684\u9879\u76ee\uff0c\u6709N\u4e2a\u5e76\u5217\u7684\u5de5\u7a0b\uff0c\u6bcf\u4e2a\u5de5\u7a0b\u7684\u4e3bmakefile\u6587\u4ef6\u90fd\u5305\u6db5\u4e86\u5f88\u591a\u7684\u81ea\u52a8\u751f\u6210\u7684.mk\u6587\u4ef6\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Mac%E4%B8%8A%E7%BC%96%E8%AF%91%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98\"><\/span>Mac\u4e0a\u7f16\u8bd1\u51fa\u73b0\u7684\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"%E9%97%AE%E9%A2%981%EF%BC%9A%E6%89%BE%E4%B8%8D%E5%88%B0opensslsslh%E6%96%87%E4%BB%B6\"><\/span>\u95ee\u98981\uff1a\u627e\u4e0d\u5230openssl\/ssl.h\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>http\/mongoose.c:4473:10: fatal error: 'openssl\/ssl.h' file not found #include &lt;openssl\/ssl.h&gt;<\/p>\n<p><strong>\u89e3\u51b3\u529e\u6cd5<\/strong><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/qq_31433709\/article\/details\/105256213\">https:\/\/blog.csdn.net\/qq_31433709\/article\/details\/105256213<\/a><\/p>\n<p>brew reinstall openssl\u4f1a\u63d0\u793a\u53bb\u4fee\u6539\u914d\u7f6e~\/.bash_profile<br \/>\n\u6587\u4ef6\uff0c\u5c06\u4e0b\u8f7d\u597d\u7684openssl\u590d\u5236\u5230\/Users\/yy\/Desktop\/CZWork\/XCodeDevTool\/Xcode.app\/Contents\/Developer\/Platforms\/MacOSX.platform\/Developer\/SDKs\/MacOSX.sdk\/usr\/include\u4e0b\u3002<\/p>\n<p><strong>\u539f\u56e0\u53cd\u601d<\/strong><\/p>\n<p>\u7f16\u8bd1\u5668\u4f1a\u9ed8\u8ba4\u53bb\/MacOSX.sdk\/usr\/include\u4e0b\u627eopenssl\u6807\u51c6\u5e93\uff0c\u867d\u7136Mac\u4e0a\u5b89\u88c5\u4e86\uff0c\u4f46\u662f\u5b89\u88c5\u7684\u4f4d\u7f6e\u4e0d\u662f\u8981\u6c42\u7684\u8fd9\u4e2a\u4f4d\u7f6e\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E9%97%AE%E9%A2%982%EF%BC%9Aerror_expected_expression\"><\/span>\u95ee\u98982\uff1aerror: expected expression[]()<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u95ee\u4e86\u4e13\u4e1a\u4eba\u58eb\u624d\u77e5\u9053\u8fd9\u4e2a\u5de5\u7a0b\u7528\u4e86c++11\u7684\u8bed\u6cd5\uff0c\u7f16\u8bd1\u7684\u65f6\u5019\u8981\u5728\u7f16\u8bd1\u53c2\u6570CFLAGS\u52a0\u4e0a-std=c++11<\/p>\n<p>\u5de5\u7a0b\u6709\u592a\u591a\u5730\u65b9\u6709mk\u6587\u4ef6\uff0c\u6709\u5f88\u591a\u7f16\u8bd1\u8bed\u53e5\uff0c\u96be\u9053\u6bcf\u4e2a\u5730\u65b9\u90fd\u8981\u52a0\uff1f<\/p>\n<p><strong>\u89e3\u51b3\u529e\u6cd5<\/strong><\/p>\n<p>\u7814\u7a76\u53d1\u73b0NetBeans\u5728\u4e3b\u5de5\u7a0b\u91cc\u81ea\u52a8\u751f\u6210\u7684mk\u6587\u4ef6\u91cc\uff0c\u81ea\u52a8\u751f\u6210\u4e86CXXFLAGS,\u6539\u4e3aCXXFLAGS=-std=c++11\u5373\u53ef\uff0c\u6ce8\u610f\u4e0d\u662fCFLAGS\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E9%97%AE%E9%A2%983%EF%BC%9Agcc_6%E6%96%B0%E5%A2%9E%E7%BC%96%E8%AF%91%E8%AD%A6%E5%91%8A\"><\/span>\u95ee\u98983\uff1agcc 6\u65b0\u589e\u7f16\u8bd1\u8b66\u544a<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>..\/p2p_lib_core\/core\/core_def.h:98:93: error: invalid suffix on literal; C++11 requires a<br \/>\nspace between literal and identifier [-Wreserved-user-defined-literal]<br \/>\n\u2026if(D&amp;(P2P_USE_LOG_STATUS)){printf(&quot;JR LOG (&quot;#D&quot;):&quot;x);\u2026<\/p>\n<p><strong>\u89e3\u51b3\u529e\u6cd5<\/strong><\/p>\n<p>\u53c2\u7167\uff1a<a href=\"https:\/\/blog.csdn.net\/xiaoyur347\/article\/details\/51628408\">https:\/\/blog.csdn.net\/xiaoyur347\/article\/details\/51628408<\/a><\/p>\n<p>\u7ed9core_def.h\u6587\u4ef6\u4e2d\u7684\u6240\u6709&quot;JR LOG (&quot;#D&quot;):&quot;\u540e\u9762\u589e\u52a0\u7a7a\u683c<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E9%97%AE%E9%A2%984%EF%BC%9A%E8%AF%AD%E6%B3%95%E8%A7%84%E8%8C%83%E7%9A%84%E9%97%AE%E9%A2%98\"><\/span>\u95ee\u98984\uff1a\u8bed\u6cd5\u89c4\u8303\u7684\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5f88\u591a\u5730\u65b9\u8bed\u6cd5\u62a5\u9519\uff0c\u8981\u5f3a\u8f6c\u6210void *\u7c7b\u578b\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%E9%97%AE%E9%A2%985%EF%BC%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E6%89%BE%E4%B8%8D%E5%88%B0key_t\"><\/span>\u95ee\u98985\uff1a\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\u627e\u4e0d\u5230key_t<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5206\u6790\u8fd9\u79cd\u6570\u636e\u7c7b\u578b\uff0c\u81ea\u5df1\u5b9a\u4e49 typedef int key_t;<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"726\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u6211\u7684Mac\u7f16\u8bd1\u73af\u58831.\u64cd\u4f5c\u7cfb\u7edf2.\u7f16\u8bd1\u73af\u58831)make2)gcc\/g++\u539f\u59cb\u9879\u76ee\u6982\u51b5Mac\u4e0a\u7f16 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/726"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=726"}],"version-history":[{"count":21,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":7276,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions\/7276"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}