MSYS2安装
1,安裝環境
系統版本:Windows 10 專業版
系統類型:64位操作系統,基于x64的處理器
?
2,下載
在http://www.msys2.org/首頁,里面有下載鏈接和安裝說明。
當前64位版本是msys2-x86_64-20180531.exe
直接點擊msys2-x86_64-20180531.exe安裝就行了,需要留意的是盡量不要安裝在Program Files這種有空格的目錄中。
?
3,修改鏡像地址,加快安裝工具時的下載速度:
(此處的根目錄為MSYS2的安裝目錄)
在/etc/pacman.d/mirrorlist.mingw32中前面增加Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/
在/etc/pacman.d/mirrorlist.mingw64中前面增加Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
在/etc/pacman.d/mirrorlist.msys中前面增加Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/
?
4,更新核心系統包
打開msys2_shell.cmd就可以啟動了。
執行如下命令:
(Update the package database and core system packages with: )
pacman -Syu
當執行打印出如下警告信息后
警告:terminate MSYS2 without returning to shell and check for updates again
警告:for example close your terminal window instead of calling exit
關閉MSYS2終端,重新打開,再執行如下命令:
(If needed, close MSYS2, run it again from Start menu. Update the rest with: )
pacman -Su
?
5,安裝gcc和make:
pacman -S gcc
pacman -S make
至此,MSYS2編譯和運行環境都搭建好了。
?
6,參考文章
https://blog.csdn.net/linuxandroidwince/article/details/72388955
https://blog.csdn.net/qiuzhiqian1990/article/details/56671839
?
總結
- 上一篇: jass——group的使用
- 下一篇: 西门子S120运动控制西门Simotio