{"id":1607,"date":"2021-03-25T17:53:47","date_gmt":"2021-03-25T08:53:47","guid":{"rendered":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/?page_id=1607"},"modified":"2021-03-29T12:10:34","modified_gmt":"2021-03-29T03:10:34","slug":"mingw","status":"publish","type":"page","link":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/windows\/mingw\/","title":{"rendered":"MinGW \u306e\u7c21\u5358\u306a\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>MinGW \u306f\u7c21\u5358\u306b\u8a00\u3046\u3068\uff0c Windows \u3067\u4f7f\u3048\u308b GCC\uff08\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u4f7f\u3048\u308b gcc, g++, gfortran \u306a\u3069\u306eGNU \u30b3\u30f3\u30d1\u30a4\u30e9\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff09\u3067\u3059\u3002\u3053\u3053\u3067\u306f\uff0c\u521d\u3081\u3066 PC \u5b9f\u7fd2\u5ba4\u74b0\u5883\uff08HEROIC 2021\uff09\u306e Windows \u3067 MinGW \u3092\u4f7f\u3046\u4eba\u5411\u3051\u306b\uff0c\u7c21\u5358\u306a\u4f7f\u3044\u65b9\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3>\u57fa\u672c\u306e gcc \u7de8<\/h3>\n<h4>1. Windows PowerShell\uff08\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u306e\u8d77\u52d5<\/h4>\n<p>\u300c\u30b9\u30bf\u30fc\u30c8\u300d\u304b\u3089 Windows PowerShell \u3092\u63a2\u3057\u3066\u8d77\u52d5\u3057\u307e\u3059\u3002\uff08\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u3082\u53ef\u3002\uff09<\/p>\n<h4>2. \u30e1\u30e2\u5e33\u306e\u8d77\u52d5<\/h4>\n<p>PowerShell\u00a0 \u3092\u8d77\u52d5\u3057\u305f\u3089\uff0c\uff08\u4ee5\u4e0b\u3067\u306f\u30d7\u30ed\u30f3\u30d7\u30c8\u304c <code>C:\\Users\\user<\/code> \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\uff0cPC \u5b9f\u7fd2\u5ba4\u3067\u306f <code>H:\\<\/code> \u307e\u305f\u306f <code>H:\\_redirected\\Document<\/code> \u3068\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3059\u307f\u307e\u305b\u3093\u3002\uff09<\/p>\n<pre>notepad<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u300c\u30e1\u30e2\u5e33\u300d\u3092\u958b\u304d\u307e\u3059\u3002\uff08[\u30b9\u30bf\u30fc\u30c8] \u304b\u3089\u300c\u30e1\u30e2\u5e33\u300d\u3092\u63a2\u3057\u3066\u30af\u30ea\u30c3\u30af\u3057\u3066\u8d77\u52d5\u3057\u3066\u3082\u3044\u3044\u3067\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1650 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-640x438.png\" alt=\"\" width=\"640\" height=\"438\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-640x438.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-300x205.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-360x246.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>3. C \u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u306e\u4f5c\u6210\u3068\u4fdd\u5b58<\/h4>\n<p>\u30e1\u30e2\u5e33\u306b\u4ee5\u4e0b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u66f8\u3044\u3066\uff0c\u300c<code>hello.c<\/code>\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4fdd\u5b58\u3057\u307e\u3059\u3002\uff08\u30e1\u30e2\u5e33\u306e\u300c\u30d5\u30a1\u30a4\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<pre>#include &lt;stdio.h&gt;\r\n\r\nint main()\r\n{\r\n    printf(\"Hello, C!\\n\");\r\n    return 0;\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1628 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw2a-640x417.png\" alt=\"\" width=\"640\" height=\"417\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw2a-640x417.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw2a-300x195.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw2a-360x234.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw2a.png 765w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>4. C \u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3068\u5b9f\u884c<\/h4>\n<p>\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u300c<code>hello.c<\/code>\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4fdd\u5b58\u3057\u305f\u3089\uff0cPowerShell \u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306b<\/p>\n<pre>gcc -o hello hello.c<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002\u30a8\u30e9\u30fc\u306a\u304f\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u305f\u3089\uff0c<\/p>\n<pre>.\\hello<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u5b9f\u884c\u7d50\u679c\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>Hello, C!<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1651 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw3b-640x438.png\" alt=\"\" width=\"640\" height=\"438\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw3b-640x438.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw3b-300x205.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw3b-360x246.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw3b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3>\u57fa\u672c\u306e g++ \u7de8<\/h3>\n<h4>1. Windows PowerShell\uff08\u307e\u305f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u306e\u8d77\u52d5<\/h4>\n<p>\u300c\u30b9\u30bf\u30fc\u30c8\u300d\u304b\u3089 Windows PowerShell \u3092\u63a2\u3057\u3066\u8d77\u52d5\u3057\u307e\u3059\u3002\uff08\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u3082\u53ef\u3002\uff09<\/p>\n<h4>2. \u30e1\u30e2\u5e33\u306e\u8d77\u52d5<\/h4>\n<p>PowerShell\u00a0 \u3092\u8d77\u52d5\u3057\u305f\u3089\uff0c\uff08\u4ee5\u4e0b\u3067\u306f\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u307e\u3059\u3002\u81ea\u5206\u306e\u3068\u9055\u3063\u3066\u3082\u6c17\u306b\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u3054\u3081\u3093\u306a\u3055\u3044\u3002\uff09<\/p>\n<pre>notepad<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u300c\u30e1\u30e2\u5e33\u300d\u3092\u958b\u304d\u307e\u3059\u3002\uff08[\u30b9\u30bf\u30fc\u30c8] \u304b\u3089\u300c\u30e1\u30e2\u5e33\u300d\u3092\u63a2\u3057\u3066\u30af\u30ea\u30c3\u30af\u3057\u3066\u8d77\u52d5\u3057\u3066\u3082\u3044\u3044\u3067\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1650 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-640x438.png\" alt=\"\" width=\"640\" height=\"438\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-640x438.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-300x205.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b-360x246.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw1b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>3. C++ \u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u306e\u4f5c\u6210\u3068\u4fdd\u5b58<\/h4>\n<p>\u30e1\u30e2\u5e33\u306b\u4ee5\u4e0b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u66f8\u3044\u3066\uff0c\u300c<code>hello.cpp<\/code>\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4fdd\u5b58\u3057\u307e\u3059\u3002\uff08\u30e1\u30e2\u5e33\u306e\u300c\u30d5\u30a1\u30a4\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n<pre>#include &lt;iostream&gt;\r\nusing namespace std;\r\nint main()\r\n{\r\n    cout &lt;&lt; \"Hello, C++!\" &lt;&lt; endl;\r\n    return 0;\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1615 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw5-640x436.png\" alt=\"\" width=\"640\" height=\"436\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw5-640x436.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw5-300x204.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw5-360x245.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw5.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>4. C++ \u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3068\u5b9f\u884c<\/h4>\n<p>\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u300c<code>hello.cpp<\/code>\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4fdd\u5b58\u3057\u305f\u3089\uff0cPowerShell \u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u306b<\/p>\n<pre>g++ -o hello hello.cpp<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002\u30a8\u30e9\u30fc\u306a\u304f\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u305f\u3089\uff0c<\/p>\n<pre>.\\hello<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3093\u3067\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\uff0c\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u5b9f\u884c\u7d50\u679c\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>Hello, C++!<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1652 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw6b-640x438.png\" alt=\"\" width=\"640\" height=\"438\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw6b-640x438.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw6b-300x205.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw6b-360x246.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw6b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3>\u65e5\u672c\u8a9e\u51fa\u529b\u304c\u5b57\u5316\u3051\u3059\u308b\u5834\u5408\u306e\u5bfe\u5fdc<\/h3>\n<p>Windows PowerShell \u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u306f\uff0c\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u65e5\u672c\u8a9e\u30b3\u30fc\u30c9\u306f Shift JIS \u3067\u3059\u304c\uff0c\u73fe\u5728\u306e\u30e1\u30e2\u5e33\u3067\u306f\uff0cUTF-8 \u3067\u3057\u304b\u4fdd\u5b58\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u65e5\u672c\u8a9e\u3092\u542b\u3080\u30d7\u30ed\u30b0\u30e9\u30e0 helloj.c \u3092 Windows PowerShell \u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u5b9f\u884c\u3059\u308b\u3068\uff0c\u5b57\u5316\u3051\u3057\u307e\u3059\u3002<\/p>\n<pre>#include &lt;stdio.h&gt;\r\n\r\nint main()\r\n{\r\n    printf(\"\u3053\u3093\u306b\u3061\u306f, C!\\n\");\r\n    return 0;\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1630 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw10-640x424.png\" alt=\"\" width=\"640\" height=\"424\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw10-640x424.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw10-300x199.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw10-360x239.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw10.png 801w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1654 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw11b-640x385.png\" alt=\"\" width=\"640\" height=\"385\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw11b-640x385.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw11b-300x180.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw11b-360x216.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw11b.png 802w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>chcp 65001 \u3068\u6253\u3064<\/h4>\n<p>\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\uff0cWindows PowerShell \u306e\u30b3\u30fc\u30c9\u30da\u30fc\u30b8\u3092 UTF-8 \u306b\u3059\u308b\u30b3\u30de\u30f3\u30c9<br \/>\n<code>chcp 65001<\/code><br \/>\n\u3092\u6253\u3064\u3068\uff0c\u305d\u306e\u5f8c\u306f\u5b57\u5316\u3051\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1655 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw12b-640x385.png\" alt=\"\" width=\"640\" height=\"385\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw12b-640x385.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw12b-300x180.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw12b-360x216.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw12b.png 802w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h4>Cmder (chcp 65001 \u6e08) \u3092\u4f7f\u3046<\/h4>\n<p>\u65e5\u672c\u8a9e\u5b57\u5316\u3051\u5bfe\u7b56\u3068\u3057\u3066 <strong>Cmder<\/strong> \u3092\u4f7f\u3046\uff0c\u3068\u3044\u3046\u624b\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>PC \u5b9f\u7fd2\u5ba4\u306e Windows \u306b\u306f\uff0c<strong>Cmder<\/strong>\u00a0 \u3068\u3044\u3046\u30bf\u30fc\u30df\u30ca\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307e\u3059\u3002<strong>Cmder<\/strong> \u306f\uff0cUNIX\u30e9\u30a4\u30af\u306a\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u305f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3068\u601d\u3048\u3070\u3044\u3044\u3067\u3059\u3002\u30bb\u30f3\u30bf\u30fc PC \u5b9f\u7fd2\u5ba4\u3067\u306f <strong>Cmder<\/strong> \u306e\u521d\u671f\u8a2d\u5b9a\u3068\u3057\u3066<br \/>\n<code>chcp 65001<\/code><br \/>\n\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u306e\u3067\uff0c\u30e6\u30fc\u30b6\u304c\u8a2d\u5b9a\u3057\u306a\u304f\u3066\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u3067 UTF-8 \u304c\u5b57\u5316\u3051\u3057\u306a\u3044\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u4e0b\u306e\u56f3\u3092\u53c2\u7167\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1656 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw13b-640x386.png\" alt=\"\" width=\"640\" height=\"386\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw13b-640x386.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw13b-300x181.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw13b-360x217.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw13b.png 792w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3><\/h3>\n<h3>\u5c11\u3057\u3060\u3051\u5fdc\u7528\u7de8\uff1aVisual Studio Code \u3092\u4f7f\u3063\u3066<\/h3>\n<p>\u3061\u3087\u3063\u3068\u3057\u305f\u30df\u30b9\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u6210\u529f\u3057\u306a\u3044\u5834\u5408\u306f\uff0c\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u306e\u30a8\u30e9\u30fc\u90e8\u5206\u3092\u63a2\u3057\u3066\u4fee\u6b63\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb&#8230; \u3068\u3044\u3063\u305f\u4f5c\u696d\u3092\u7e70\u308a\u8fd4\u3055\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\uff0c\u306a\u308b\u3079\u304f\u7c21\u5358\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u306e\u4f5c\u6210\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\uff0c\u5b9f\u884c\u304c\u3067\u304d\u308b\u3088\u3046\u306b\uff0c\u30e1\u30e2\u5e33\u3067\u306f\u306a\u304f\u5225\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u3042\u308b Visual Studio Code \u3092\u4f7f\u3063\u305f\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u8aac\u660e\u3059\u308b\u3088\u3046\u306b\uff0c\u6700\u521d\u306b\u4e00\u56de\u8a2d\u5b9a\u3059\u308c\u3070\uff0c\u3042\u3068\u306f\u30ef\u30f3\u30af\u30ea\u30c3\u30af\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3068\u5b9f\u884c\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\uff0c\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u4f5c\u6210\u4e2d\u306e\u30df\u30b9\u3082\uff0cVisual Studio Code \u304c\u305d\u308c\u3068\u306a\u304f\u6307\u6458\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u5927\u5909\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<h4>Visual Studio Code \u306e\u521d\u671f\u8a2d\u5b9a<\/h4>\n<p>Visual Studio Code \u306f\uff0c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u3060\u3068\uff0c\u30e1\u30cb\u30e5\u30fc\u3082\u65e5\u672c\u8a9e\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3057\uff0c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u4fbf\u5229\u306a\u62e1\u5f35\u6a5f\u80fd\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\uff08Emacs \u306e\u3088\u3046\u306a\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u3042\u308c\u3070\uff0c\u7ba1\u7406\u8005\u304c\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306b\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u304c\uff09Visual Studio Code \u306e\u5834\u5408\u306f\uff0c\u30e6\u30fc\u30b6\u5404\u81ea\u3067\uff08\u6700\u521d\u306b1\u56de\u3060\u3051\uff09\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/visual-studio-code-%e3%81%ae%e6%8b%a1%e5%bc%b5%e6%a9%9f%e8%83%bd%e3%81%a8%e8%a8%ad%e5%ae%9a\/\">Visual Studio Code \u306e\u62e1\u5f35\u6a5f\u80fd\u3068\u8a2d\u5b9a<\/a><\/li>\n<\/ul>\n<ol>\n<li>\u307e\u305a\uff0c[\u30b9\u30bf\u30fc\u30c8] \u304b\u3089 Visual Studio Code \u3092\u63a2\u3057\u3066\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e1\u30cb\u30e5\u30fc\u304c\u307e\u3060\u82f1\u8a9e\u306e\u307e\u307e\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u305f\u3089\uff0c\u7d42\u4e86\u3057\u307e\u3059\u3002<\/li>\n<li>Windows \u306e\u5834\u5408\u306f\uff0c\u4ee5\u4e0b\u306e9\u884c\u3092\u30b3\u30d4\u30fc\u3057\uff0cWindows PowerShell \u306b\u8cbc\u308a\u4ed8\u3051\uff0c\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<pre style=\"padding-left: 40px;\">code --install-extension ms-ceintl.vscode-language-pack-ja --force\r\ncode --install-extension ms-vscode.cpptools --force\r\ncode --install-extension formulahendry.code-runner --force\r\ncode --install-extension streetsidesoftware.code-spell-checker --force\r\ncode --install-extension james-yu.latex-workshop --force\r\ncode --install-extension krvajalm.linter-gfortran --force\r\ncode --install-extension ms-python.python --force\r\ncurl.exe -O https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/Code-User-settings.json.txt\r\nmv Code-User-settings.json.txt $env:APPDATA\\Code\\User\\settings.json<\/pre>\n<p>\u4ee5\u4e0a\u3067\uff0c\u30e1\u30cb\u30e5\u30fc\u306e\u65e5\u672c\u8a9e\u5316\u306a\u3069\u306e\u62e1\u5f35\u6a5f\u80fd\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u7d42\u4e86\u3067\u3059\u3002<\/p>\n<h4>Visual Studio Code \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u4f8b<\/h4>\n<p>Visual Studio Code \u306f [\u30b9\u30bf\u30fc\u30c8] \u304b\u3089\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u8d77\u52d5\u3067\u304d\u307e\u3059\u304c\uff0c\u3053\u3053\u3067\u306f\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306b Windows PowerShell \u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\uff0c<code>code helloj.c<\/code> \u3068\u6253\u3063\u3066\u8d77\u52d5\u3057\uff0c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1657 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw14b-640x385.png\" alt=\"\" width=\"640\" height=\"385\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw14b-640x385.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw14b-300x180.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw14b-360x216.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw14b.png 802w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u4ee5\u4e0b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre>#include &lt;stdio.h&gt;\r\n\r\nint main()\r\n{\r\n    printf(\"\u3053\u3093\u306b\u3061\u306f, C!\\n\");\r\n    return 0;\r\n}<\/pre>\n<p>\u4f5c\u6210\u3057\u7d42\u308f\u3063\u305f\u3089\uff08\u62e1\u5f35\u6a5f\u80fd\u306e\u304a\u304b\u3052\u3067\u8272\u4ed8\u3051\u3055\u308c\u307e\u3059\u3002\u8272\u4ed8\u3051\u4ee5\u5916\u306b\u3082\uff0c\u3044\u308d\u3044\u308d\u304a\u7bc0\u4ecb\u3092\u3084\u3044\u3066\u304f\u308c\u307e\u3059\u306e\u3067\u79c1\u306e\u3088\u3046\u306a\u521d\u5fc3\u8005\u306b\u306f\u3042\u308a\u304c\u305f\u3044\u3067\u3059\u3002\u3042\u308a\u304c\u305f\u8ff7\u60d1\u3068\u601d\u3046\u4e0a\u7d1a\u8005\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3002\uff09\uff0c\u53f3\u4e0a\u306e\u8d64\u67a0\u3067\u56f2\u3063\u305f\u4e09\u89d2\u30de\u30fc\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1658 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw15b-640x748.png\" alt=\"\" width=\"640\" height=\"748\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw15b-640x748.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw15b-300x350.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw15b-231x270.png 231w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw15b.png 802w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3068\u5b9f\u884c\u306e\u7d50\u679c\u304c\u753b\u9762\u4e0b\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002\uff08Code Runner \u62e1\u5f35\u6a5f\u80fd\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1659 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw16b-640x683.png\" alt=\"\" width=\"640\" height=\"683\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw16b-640x683.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw16b-300x320.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw16b-253x270.png 253w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw16b.png 813w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u51fa\u529b\u7d50\u679c\u3092\u753b\u9762\u53f3\u306b\u51fa\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\uff08\u30d2\u30f3\u30c8\u306f\uff0c\u4e0a\u306e\u7d30\u7dda\u8d64\u56db\u89d2\u306e\u4e0a\u90e8\u306e Code \u3068\u66f8\u304b\u308c\u305f\u3042\u305f\u308a\u3067\u30de\u30a6\u30b9\u53f3\u30af\u30ea\u30c3\u30af\u3067\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1660 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw17b-640x281.png\" alt=\"\" width=\"640\" height=\"281\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw17b-640x281.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw17b-300x132.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw17b-360x158.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw17b.png 1162w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u5c11\u3057\u3060\u3051\u5fdc\u7528\u7de8\uff1aEmacs \u3092\u4f7f\u3063\u3066<\/h3>\n<p>PC \u5b9f\u7fd2\u5ba4\u306e Windows \u306b\u306f\uff0cUNIX \u6587\u5316\u306b\u304a\u3051\u308b\u4f1d\u7d71\u7684\u306a\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u3042\u308b Emacs \u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u3084 Ubuntu \u306b\u3055\u3048\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u306a\u304f\u306a\u308a\uff0c\u8a00\u308f\u3093\u3084 Windows \u3067\u611b\u7528\u3057\u3066\u3044\u308b\u65b9\u304c\u3044\u308b\u306e\u304b\u3055\u3048\u5b9a\u304b\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\uff0cEmacs \u3092\u4f7f\u3063\u305f\u4f8b\u3082\u307e\u3068\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<h4>Emacs \u306e\u521d\u671f\u8a2d\u5b9a<\/h4>\n<p>PC \u5b9f\u7fd2\u5ba4\u306e Windows Emacs \u306f\u30b7\u30b9\u30c6\u30e0\u30ef\u30a4\u30c9\u306b <code>site-start.el<\/code> \u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\uff0c\u30e6\u30fc\u30b6\u306f\u7279\u306b\u8a2d\u5b9a\u3092\u884c\u3046\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3042\u3048\u3066\u8a00\u3048\u3070\uff0c\u521d\u56de\u306b1\u56de\u3060\u3051\u4ee5\u4e0b\u306e1\u884c\u3092\u30b3\u30d4\u30fc\u3057\u3066 Windows PowerShell\u00a0 \u306b\u8cbc\u308a\u4ed8\u3051\u3066\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3057\u3066\u5b9f\u884c\u3059\u308b\u3053\u3068\u304f\u3089\u3044\u3067\u3059\u3002\uff08\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\uff0c\u3084\u3063\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u3059\u3063\u304d\u308a\u3057\u307e\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u3060\u3051\u306f\uff0c<code>site-start.el<\/code> \u306b\u66f8\u3044\u3066\u304a\u3044\u3066\u3082\u7121\u8996\u3055\u308c\u3066\u3057\u307e\u3044\uff0c\u30e6\u30fc\u30b6\u5404\u81ea\u3067\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff09<\/p>\n<pre>echo '(setq inhibit-startup-message t)' &gt;&gt; $env:HOME\\.emacs<\/pre>\n<h4>Emacs \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u4f8b<\/h4>\n<p>Windows PowerShell \u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3084 Cmder \u304b\u3089 <code>runemacs helloj.c<\/code> \u3068\u6253\u3063\u3066\u8d77\u52d5\u3057\u307e\u3059\u3002<code>emacs<\/code> \u3067\u3082\u8d77\u52d5\u3057\u307e\u3059\u304c\uff0cWindows \u9650\u5b9a\u3067\u306f <code>runemacs<\/code> \u30b3\u30de\u30f3\u30c9\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\uff08\u7406\u7531\u306f\u5b9f\u969b\u306b\u6253\u3063\u3066\u8d77\u52d5\u3057\u3066\u307f\u308c\u3070\u308f\u304b\u308a\u307e\u3059\u304c\uff0c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304c\u89e3\u653e\u3055\u308c\u3066\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3066\u308b\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1661 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw20b-640x438.png\" alt=\"\" width=\"640\" height=\"438\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw20b-640x438.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw20b-300x206.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw20b-360x247.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw20b.png 762w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1662 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw21b-640x592.png\" alt=\"\" width=\"640\" height=\"592\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw21b-640x592.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw21b-300x278.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw21b-292x270.png 292w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw21b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u300cTools\u300d\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300cCompile&#8230; \u300d\u3092\u9078\u3076\u3068&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1663 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw22b-640x317.png\" alt=\"\" width=\"640\" height=\"317\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw22b-640x317.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw22b-300x149.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw22b-360x178.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw22b.png 765w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30a6\u30a4\u30f3\u30c9\u30a6\u6700\u4e0b\u6bb5\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b Compile command: \u304c\u73fe\u308c\u308b\u306e\u3067\uff0c\u305d\u306e\u307e\u307e\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\u3092\u62bc\u3059\u3068&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1664 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw23b-640x336.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw23b-640x336.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw23b-300x157.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw23b-360x189.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw23b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30a6\u30a4\u30f3\u30c9\u30a6\u304c\u5206\u5272\u3055\u308c\uff0c\u4e0b\u534a\u5206\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u5b9f\u884c\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1665 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw24b-640x592.png\" alt=\"\" width=\"640\" height=\"592\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw24b-640x592.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw24b-300x278.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw24b-292x270.png 292w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw24b.png 763w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Compilation \u30a6\u30a4\u30f3\u30c9\u30a6\u3092\u753b\u9762\u53f3\u306b\u51fa\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\uff08\u300cFile\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300cNew Window on Right\u300d\u3092\u4f7f\u3044\uff0c\u53f3\u306e Buffer \u306b *compilation* \u3092\u51fa\u3057\u307e\u3059\u3002\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-1670 aligncenter\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/minw30-640x382.png\" alt=\"\" width=\"640\" height=\"382\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/minw30-640x382.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/minw30-300x179.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/minw30-360x215.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/minw30.png 991w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u3053\u306e\u30da\u30fc\u30b8\u306f\uff0c\u30e6\u30fc\u30b6\u306e\u65b9\u304b\u3089\uff0c<\/p>\n<blockquote><p>\u300cMinGW-w64 10.2.0\u300d\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\uff0c\u3069\u3053\u304b\u3089\u5165\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u5165\u53e3\u304c\u898b\u5f53\u305f\u308a\u307e\u305b\u3093\u3002<\/p><\/blockquote>\n<p>\u3068\u3044\u3046\u3054\u8cea\u554f\u3092\u53d7\u3051\u3066\uff0c\u66f8\u3044\u3066\u307f\u305f\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>MinGW \u3068\u306f\uff0c\u305f\u3068\u3048\u3070 Visual Studio \u306e\u3088\u3046\u306a\uff0c\u4f55\u304b\u30a2\u30d7\u30ea\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u306f\u306a\u304f\uff0c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u4f7f\u3048\u308b <code>gcc<\/code>, <code>g++<\/code>, <code>gfortran<\/code> \u306a\u3069\u306e\u30b3\u30de\u30f3\u30c9\u7fa4\u3068\u8003\u3048\u308c\u3070\u3088\u308d\u3057\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>MinGW \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\uff0cWindows PowerShell \u3084\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3084 Cmder \u306a\u3069\u306e\uff0c\u3044\u308f\u3086\u308b\u30bf\u30fc\u30df\u30ca\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\uff0c <code>gcc<\/code> \u3068\u304b <code>g++<\/code> \u3068\u304b <code>gfortran<\/code>\u00a0 \u3068\u304b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u8fbc\u3093\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\uff0c<span style=\"text-decoration: underline;\"><strong>MinGW \u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u3082\u306e<\/strong><\/span>\u306f\uff0c\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u8fbc\u3080\u305f\u3081\u306e<span style=\"text-decoration: underline;\"><strong>\u30bf\u30fc\u30df\u30ca\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/strong><\/span>\u3068\uff0c\u30d7\u30ed\u30b0\u30e9\u30e0\u6587\u3092\u66f8\u304f\u305f\u3081\u306e<span style=\"text-decoration: underline;\"><strong>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306f\uff0c\u500b\u4eba\u306e\u597d\u307f\u3084\u7d4c\u9a13\u306b\u3088\u308a\u3055\u307e\u3056\u307e\u9078\u629e\u80a2\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u6a19\u6e96\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u300c\u30e1\u30e2\u5e33\u300d\uff08notepad\uff09\u306e\u307b\u304b\uff0cVisual Studio Code\uff0cEmacs \u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\uff0c\u4ed6\u306b\u3082 gedit \u3084 vim \u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\uff0c\u3053\u308c\u304b\u3089\u65b0\u3057\u304fPC \u5b9f\u7fd2\u5ba4\u306e Windows \u74b0\u5883\u3067 MinGW \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u306f\u3058\u3081\u308b\u3068\u3044\u3046\u306e\u3067\u3042\u308c\u3070\uff0c\u307e\u3063\u305f\u304f\u306e\u521d\u5fc3\u8005\u3067\u3042\u3063\u3066\u3082\uff0c\u3042\u308b\u3044\u306f UNIX \u7684\u6587\u5316\u306b\u6163\u308c\u89aa\u3057\u3093\u3067\u304d\u305f\u65b9\u3067\u3042\u3063\u3066\u3082\uff0c\u30bf\u30fc\u30df\u30ca\u30eb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f <strong>Cmder<\/strong>\uff0c\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306f <strong>Visual Studio Code<\/strong> \u3067\u306f\u3058\u3081\u305f\u3089\u3069\u3046\u3067\u3057\u3087\u3046\u304b\uff0c\u3068\u3044\u3046\u306e\u304c\u79c1\u306e\u63d0\u6848\u3067\u3059\u3002<span style=\"color: #999999;\">\uff08\u307e\u305f\u500b\u4eba\u7684\u597d\u307f\u3092\u5f37\u5236\u3057\u3066\u3044\u308b\uff01\u3068\u3044\u3046\u6279\u5224\u306f\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3002\uff09<\/span><\/p>\n<p>Cmder \u3067\u4f7f\u3048\u308b Bash \u7684\u306a\u30b3\u30de\u30f3\u30c9\u7fa4\uff08<code>ls<\/code>, <code>cp<\/code>, <code>mv<\/code>, <code>rm<\/code> \u7b49\uff09\u306f Linux (Ubuntu) \u3067\u3082 macOS \u3067\u3082\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4f7f\u3048\u308b\u5171\u901a\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3057\uff0cCmder \u306f\u521d\u671f\u8a2d\u5b9a\u3067 UTF-8 \u5bfe\u5fdc\u306b\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u65e5\u672c\u8a9e\u5b57\u5316\u3051\u554f\u984c\u304c\u3042\u308a\u307e\u305b\u3093\uff08UTF-8 \u306e\u30c6\u30ad\u30b9\u30c8\u3092 UTF-8 \u3067\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3067\uff09\u3002\u3053\u308c\u3082 Ubuntu \u3084 macOS\u00a0 \u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3068\u540c\u69d8\u3067\u3059\u3002<span style=\"color: #999999;\">\uff08\u3060\u3044\u305f\u3044\uff0cWindows \u6a19\u6e96\u642d\u8f09\u306e\u300c\u30e1\u30e2\u5e33\u300d\u304c Shift-JIS \u3067\u4fdd\u5b58\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u4eca\u3068\u306a\u3063\u3066\u306f\uff0cWindows \u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3082 UTF-8 \u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u3057\u3066\u3082\u3088\u3044\u9803\u3060\u3068\u601d\u3046\u306e\u3067\u3059\u304c&#8230; \uff09<\/span><\/p>\n<p>\u307e\u305f\uff0c\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf Visual Studio Code \u306f PC \u5b9f\u7fd2\u5ba4\u3067\u306f Windows, Ubuntu, macOS \u5168\u3066\u306b\u304a\u3044\u3066\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002\u30bb\u30f3\u30bf\u30fc\u304c\u63d0\u6848\u3057\u3066\u3044\u308b\u521d\u671f\u8a2d\u5b9a\u3092\u884c\u3048\u3070\uff0cOS \u306b\u3088\u3089\u305a\u306b\u540c\u7b49\u306a\u4f7f\u3044\u5fc3\u5730\u304c\u3048\u3089\u308c\u307e\u3059\u3057\uff0c\u4f55\u3088\u308a\u7121\u6599\u3067\u3059\u3057\uff0c\u6d3b\u767a\u306b\u958b\u767a\u30fb\u6539\u826f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<span style=\"color: #999999;\">\uff08\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u983b\u5ea6\u304c\u9ad8\u3059\u304e\u3066\uff0c\u30cd\u30c3\u30c8\u30d6\u30fc\u30c8\u30a4\u30e1\u30fc\u30b8\u306e\u66f4\u65b0\u304c\u5927\u5909\u3002\uff09<\/span><\/p>\n<h3>\u88dc\u8db3\uff1agfortran \u3082\u540c\u69d8\u306b\u4f7f\u3048\u307e\u3059<\/h3>\n<p>\u57fa\u672c\u7de8\u3067\u306f <code>gcc<\/code>, <code>g++<\/code>\uff0c\u5c11\u3057\u3060\u3051\u5fdc\u7528\u7de8\u3067\u306f <code>gcc<\/code> \u306e\u307f\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u304c\uff0cMinGW (GNU \u30b3\u30f3\u30d1\u30a4\u30e9\u30b3\u30ec\u30af\u30b7\u30e7\u30f3) \u306e\u30b3\u30de\u30f3\u30c9\u306e\u4e00\u3064\u3067\u3042\u308b <code>gfortran<\/code> \u3082\u540c\u69d8\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u306e <code>gfortran<\/code> \u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u306f\u3082\u3061\u308d\u3093\uff0cVisual Studio Code \u3084 Emacs \u3067\u3082\u540c\u69d8\u306b\u4f7f\u3048\u307e\u3059\u306e\u3067\uff0c\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Emacs \u3067\u306f\uff0c*.f \u3068 *.f90 \u306e\u62e1\u5f35\u5b50\u306b\u3064\u3044\u3066\uff0c\u300cCompile&#8230; \u300d\u3092\u9078\u629e\u3059\u308b\u3068 Compile command: \u306b <code>gfortran<\/code> \u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002\u307e\u305f\uff0cVisual Studio Code \u3067\u3082 setting.json \u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1680\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw30-640x575.png\" alt=\"\" width=\"640\" height=\"575\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw30-640x575.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw30-300x270.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw30.png 968w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1681\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw31-640x621.png\" alt=\"\" width=\"640\" height=\"621\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw31-640x621.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw31-300x291.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw31-278x270.png 278w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/mingw31.png 726w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MinGW \u306f\u7c21\u5358\u306b\u8a00\u3046\u3068\uff0c Windows \u3067\u4f7f\u3048\u308b GC <a href=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/windows\/mingw\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":33,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-1607","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/pages\/1607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/comments?post=1607"}],"version-history":[{"count":27,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/pages\/1607\/revisions"}],"predecessor-version":[{"id":1683,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/pages\/1607\/revisions\/1683"}],"up":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/pages\/33"}],"wp:attachment":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/media?parent=1607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}