{"id":2139,"date":"2018-07-21T21:31:31","date_gmt":"2018-07-21T12:31:31","guid":{"rendered":"https:\/\/mattyan.net\/blog\/?p=2139"},"modified":"2018-07-21T21:31:31","modified_gmt":"2018-07-21T12:31:31","slug":"scoop%e7%92%b0%e5%a2%83%e3%81%a7sdl2%e3%82%92%e3%83%93%e3%83%ab%e3%83%89%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/mattyan.net\/blog\/?p=2139","title":{"rendered":"Scoop\u74b0\u5883\u3067SDL2\u3092\u30d3\u30eb\u30c9\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p>\u4f55\u3082\u8003\u3048\u305a\u306b\u30d3\u30eb\u30c9\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u304f\u3063\u3066\u9762\u5012\u304f\u3055\u3044\u3053\u3068\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4eca\u5f8c\u306b\u5099\u3048\u3066\u30e1\u30e2<br \/>\n<!--more--><\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>sh\u306f<br \/>\n[powershell]<br \/>\nScoop install busybox<br \/>\n[\/powershell]<br \/>\n\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f<br \/>\ngcc\u306f<br \/>\n[powershell]<br \/>\nScoop install gcc<br \/>\n[\/powershell]<br \/>\n\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f<\/p>\n<h2>.\/configure<\/h2>\n<p>\/bin\/sh\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u306e\u3067(\u3042\u308b\u308f\u3051\u306a\u3044\u3002Windows\u74b0\u5883\u3060\u3057)configure\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u52d5\u304b\u306a\u3044\u3002<br \/>\n\u591a\u5206\u4ed6\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3082configure\u306f\u7121\u7406\u3060\u304b\u3089cmake\u304c\u306a\u3044\u3068\u30d3\u30eb\u30c9\u306f\u7121\u7406\u305d\u3046<\/p>\n<h2>cmake<\/h2>\n<p>[powershell]<br \/>\nScoop install cmake make<br \/>\n[\/powershell]<br \/>\n\u3067cmake\u3068make\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<a href=\"https:\/\/www.libsdl.org\/download-2.0.php\">\u3053\u3053<\/a>\u304b\u3089sdl2.0\u306e\u6700\u65b0\u306etar.gz\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\n[powershell]<br \/>\ntar xvfz SDL2-x.x.x.tar.gz<br \/>\ncd SDL2-x.x.x<br \/>\nmkdir build<br \/>\ncd build<br \/>\n[\/powershell]<br \/>\n\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5c55\u958b\u3057\u3066\u30d3\u30eb\u30c9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u79fb\u52d5\u3002<br \/>\n\u3053\u3053\u3067cmake\u3059\u308b\u308f\u3051\u3060\u304c\u3001<br \/>\n[powershell]<br \/>\ncmake -G &quot;MinGW Makefiles&quot; ..<br \/>\n[\/powershell]<br \/>\n\u3060\u3068<\/p>\n<pre>\nCMake Error at D:\/Scoop\/apps\/cmake\/3.12.0\/share\/cmake-3.12\/Modules\/CMakeMinGWFindMake.cmake:12 (message):\n  sh.exe was found in your PATH, here:\n  D:\/Scoop\/shims\/sh.exe\n  For MinGW make to work correctly sh.exe must NOT be in your path.\n  Run cmake from a shell that does not have sh.exe in your PATH.\n  If you want to use a UNIX shell, then use MSYS Makefiles.\nCall Stack (most recent call first):\n  CMakeLists.txt:6 (project)\nCMake Error: CMAKE_C_COMPILER not set, after EnableLanguage\n<\/pre>\n<p>\u3068\u51fa\u3066cmake\u5931\u6557\u3002MSYS Makefiles\u3067\u3084\u308c\u3068\u3042\u308b\u304b\u3089MSYS Makefiles\u3067\u8a66\u3057\u3066\u307f\u305f\u3089<\/p>\n<pre>\n-- The C compiler identification is GNU 7.3.0\n-- Check for working C compiler: D:\/Scoop\/apps\/gcc\/current\/bin\/gcc.exe\n-- Check for working C compiler: D:\/Scoop\/apps\/gcc\/current\/bin\/gcc.exe -- broken\nCMake Error at D:\/Scoop\/apps\/cmake\/3.12.0\/share\/cmake-3.12\/Modules\/CMakeTestCCompiler.cmake:52 (message):\n  The C compiler\n    \"D:\/Scoop\/apps\/gcc\/current\/bin\/gcc.exe\"\n  is not able to compile a simple test program.\n  It fails with the following output:\n    Change Dir: sdl\/SDL2-2.0.8\/build\/CMakeFiles\/CMakeTmp\n    Run Build Command:\"D:\/Scoop\/shims\/make.exe\" \"cmTC_f78a5\/fast\"\n    D:\/Scoop\/apps\/make\/current\/make -f CMakeFiles\/cmTC_f78a5.dir\/build.make CMakeFiles\/cmTC_f78a5.dir\/build\n    make[1]: Entering directory 'sdl\/SDL2-2.0.8\/build\/CMakeFiles\/CMakeTmp'\n    sh: \/D\/Scoop\/apps\/cmake\/3.12.0\/bin\/cmake.exe: Permission denied\n    make[1]: *** [CMakeFiles\/cmTC_f78a5.dir\/build.make:65: CMakeFiles\/cmTC_f78a5.dir\/testCCompiler.c.obj] Error 126\n    make[1]: Leaving directory 'sdl\/SDL2-2.0.8\/build\/CMakeFiles\/CMakeTmp'\n    make: *** [makefile:121: cmTC_f78a5\/fast] Error 2\n  CMake will not be able to correctly generate this project.\nCall Stack (most recent call first):\n  CMakeLists.txt:6 (project)\n<\/pre>\n<p>\u3068\u51fa\u3066\u3084\u306f\u308a\u5931\u6557\u3002<br \/>\n\u3044\u308d\u3044\u308d\u63a2\u3063\u305f\u7d50\u679c<br \/>\n<a href=\"https:\/\/www.scivision.co\/brew-install-scoop-for-windows\/\">brew-like Scoop for Windows<\/a>\u3053\u3053\u306b<\/p>\n<pre>\ncmake -G \"MinGW Makefiles\" -DCMAKE_SH=\"CMAKE_SH-NOTFOUND\" ..\n<\/pre>\n<p>\u3067\u3084\u3063\u3066\u307f\u308d\u3068\u3042\u3063\u305f\u306e\u3067\u3001\u8a66\u3057\u305f\u3068\u3053\u308dcmake\u6210\u529f<br \/>\nmake\u3057\u305f\u3089libSDL2.dll\u3068libSDL2-static.a\u306e\u4e21\u65b9\u304c\u3067\u304d\u3066\u305f\u3002<br \/>\n\u305f\u3060\u3057\u3001\u3053\u306e\u307e\u307e\u3060\u3068C:\\Program Files(x86)\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3059\u308b\u306e\u3067\u3001-DCMAKE_INSTALL_PREFIX=&#8221;D:\\Scoop\\lib&#8221;\u3068\u304b\u8a2d\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092\u5909\u3048\u305f\u307b\u3046\u304c\u826f\u3055\u305d\u3046\u3002<br \/>\n\u4f7f\u3046\u3068\u304d\u306f-DCMAKE_MODULE_PATH=&#8221;D:\\Scoop\\lib&#8221;\u3067\u898b\u3064\u3051\u3066\u304f\u308c\u308b\u3063\u307d\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f55\u3082\u8003\u3048\u305a\u306b\u30d3\u30eb\u30c9\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u304f\u3063\u3066\u9762\u5012\u304f\u3055\u3044\u3053\u3068\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u4eca\u5f8c\u306b\u5099\u3048\u3066\u30e1\u30e2<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2139","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2139"}],"version-history":[{"count":0,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2139\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattyan.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}