{"id":2332,"date":"2014-07-01T21:17:25","date_gmt":"2014-07-01T12:17:25","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=2332"},"modified":"2014-07-01T21:17:25","modified_gmt":"2014-07-01T12:17:25","slug":"macmaverics%e3%81%a7box2d%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/2332","title":{"rendered":"OS X(Mavericks)\u3067Box2D\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>Box2D\u306f\u30012\u6b21\u5143\u306e\u7269\u7406\u30a8\u30f3\u30b8\u30f3\u3067\u3042\u308b\u3002\u3061\u3087\u3063\u3068\u3057\u305f\u5b9f\u9a13\u306e\u305f\u3081\u306bMac\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u305f\u3089\u3001\u3059\u3093\u306a\u308a\u3068\u3044\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u30e1\u30e2\u3002<br \/>\n\u5143\u30cd\u30bf\u306f<a href=\"http:\/\/www.iforce2d.net\/b2dtut\/setup-osx\">\u3053\u3061\u3089<\/a>\u3002<br \/>\n<!--more--><\/p>\n<h2>\u6e96\u5099<\/h2>\n<p>\u307e\u305a\u306f\u3001<a href=\"https:\/\/code.google.com\/p\/box2d\/downloads\/list\">Box2D\u306e\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u3001\u6700\u65b0\u306eBox2D\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002\u8a18\u8f09\u6642\u70b9\u3067\u306e\u6700\u65b0\u306fBox2D_v2.3.0.7z\u3067\u3042\u308b\u3002<br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001Box2D_v2.3.0.7z\u306e\u3088\u3046\u306a7zip\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u304c\u5f97\u3089\u308c\u308b\u306e\u3067\u3001UnArchiver\u306a\u3069\u3067\u89e3\u51cd\u3057\u3066\u304a\u304f\u3002<br \/>\n\u30d3\u30eb\u30c9\u306bCMake\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001\u5c0e\u5165\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3002Brew\u306a\u3089\u3070\u4ee5\u4e0b\u3067OK\u3002<\/p>\n<pre>brew install cmake<\/pre>\n<p>X11\u306e\u74b0\u5883\u304c\u5fc5\u8981\u306a\u306e\u3067XQuartz\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<a href=\"http:\/\/xquartz.macosforge.org\/landing\/\">XQuartz\u306e\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u6700\u65b0\u7248\u306e\u3082\u306e\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002\u8a18\u8f09\u6642\u70b9\u3067\u306e\u6700\u65b0\u306fXQuartz-2.7.6.dmg\u3067\u3042\u308b\u3002\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u304c\u3001\u518d\u30ed\u30b0\u30a4\u30f3\u3057\u306a\u3044\u3068\u6709\u52b9\u306b\u306a\u3089\u306a\u3044\u3068\u8a00\u308f\u308c\u308b\u306e\u3067\u518d\u8d77\u52d5\u3057\u3066\u304a\u3044\u305f\u3002<\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u304d\u3001Box2D\u3092\u5c55\u958b\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308b\u30d3\u30eb\u30c9\u7528\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3059\u308b\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3002<\/p>\n<pre>cd ~\/Downloads\/Box2D_v2.1.2\/Box2D\/Build<\/pre>\n<p>\u7d9a\u3044\u3066\u3001cmake\u3068make\u3092\u884c\u3046\u3002<\/p>\n<pre>cmake ..\nmake<\/pre>\n<p>\u3059\u308b\u3068\u3001\u6700\u5f8c\u306e\u65b9\u3067\u30a8\u30e9\u30fc\u304c\u751f\u3058\u308b\u3002<\/p>\n<pre>[ 97%] Building CXX object Testbed\/CMakeFiles\/Testbed.dir\/Framework\/Main.cpp.o\nIn file included from \/Users\/itoh\/Research\/Box2D_v2.3.0\/Box2D\/Testbed\/Framework\/Main.cpp:20:\n\/Users\/itoh\/Research\/Box2D_v2.3.0\/Box2D\/Testbed\/Framework\/Test.h:38:24: error:\n      no member named 'rand' in namespace 'std'; did you mean simply 'rand'?\n        float32 r = (float32)(std::rand() & (RAND_LIMIT));\n                              ^~~~~~~~~\n                              rand\n\/usr\/include\/stdlib.h:159:6: note: 'rand' declared here\nint      rand(void);\n         ^\nIn file included from \/Users\/itoh\/Research\/Box2D_v2.3.0\/Box2D\/Testbed\/Framework\/Main.cpp:20:\n\/Users\/itoh\/Research\/Box2D_v2.3.0\/Box2D\/Testbed\/Framework\/Test.h:47:24: error:\n      no member named 'rand' in namespace 'std'; did you mean simply 'rand'?\n        float32 r = (float32)(std::rand() & (RAND_LIMIT));\n                              ^~~~~~~~~\n                              rand\n\/usr\/include\/stdlib.h:159:6: note: 'rand' declared here\nint      rand(void);<\/pre>\n<p>\u8981\u306f\u3001std::rand()\u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u90e8\u5206\u306f\u3001rand()\u3058\u3083\u306a\u3044\u306e\uff1f\u3068\u3044\u3046\u6307\u6458\u306a\u306e\u3067\u3001~\/Downloads\/Box2D_v2.3.0\/Box2D\/Testbed\/Framework\/Test.h\u306e38\u884c\u76ee\u306847\u884c\u76ee\u306estd::rand()\u3092rand()\u306e\u307f\u306b\u4fee\u6b63\u3059\u308b\u3002<br \/>\n\u5f8c\u306f\u518d\u5ea6make\u3092\u884c\u3048\u3070\u304d\u3061\u3093\u3068\u30d3\u30eb\u30c9\u3055\u308c\u308b\u3002<\/p>\n<h2>\u52d5\u4f5c\u78ba\u8a8d<\/h2>\n<p>\u30d3\u30eb\u30c9\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u306b\u3066 TestBed\/TestBed \u3092\u5b9f\u884c\u3059\u308c\u3070\u3001XQuartz\u304c\u8d77\u52d5\u3057\u305f\u5f8c\u3067TestBed\u304c\u52d5\u304d\u51fa\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/oohito.com\/nqthm\/wp-content\/uploads\/2014\/07\/Screen-Shot-2014-07-01-at-21.14.58-1-1.png\" alt=\"Screen Shot 2014-07-01 at 21.14.58\" width=\"1292\" height=\"1012\" class=\"alignnone size-full wp-image-2333\" \/><br \/>\n1\u304b\u30896\u307e\u3067\u306e\u30ad\u30fc\u3092\u62bc\u3059\u3053\u3068\u3067\u753b\u9762\u306b\u7269\u4f53\u304c\u8868\u793a\u3055\u308c\u3001\u30b9\u30da\u30fc\u30b9\u3092\u62bc\u3059\u3068\u30e9\u30f3\u30c0\u30e0\u306a\u7b87\u6240\u304b\u3089\u7389\u304c\u98db\u3073\u51fa\u3066\u304f\u308b\u3002\u307e\u305f\u3001\u30b7\u30d5\u30c8\u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30c9\u30e9\u30c3\u30b0\u3059\u308b\u3068\u3001\u4efb\u610f\u306e\u5834\u6240\u3001\u4efb\u610f\u306e\u65b9\u5411\u304b\u3089\u7389\u3092\u767a\u5c04\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Box2D\u306f\u30012\u6b21\u5143\u306e\u7269\u7406\u30a8\u30f3\u30b8\u30f3\u3067\u3042\u308b\u3002\u3061\u3087\u3063\u3068\u3057\u305f\u5b9f\u9a13\u306e\u305f\u3081\u306bMac\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u305f\u3089\u3001\u3059\u3093\u306a\u308a\u3068\u3044\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u30e1\u30e2\u3002 \u5143\u30cd\u30bf\u306f\u3053\u3061\u3089\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-2332","post","type-post","status-publish","format-standard","hentry","category-mac"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=2332"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2332\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=2332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=2332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=2332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}