下载地址:
清华大学镜像:https://mirrors.tuna.tsinghua.edu.cn/msys2/distrib/
中国科学技术大学镜像:http://mirrors.ustc.edu.cn/msys2/distrib/
国内用清华和科大的镜像下载速度很快,官网的下载速度很慢。
按照官方指导安装msys2后按如下方法修改镜像源
修改镜像源(修改三个文件):
(1)C:\msys32\etc\pacman.d\mirrorlist.mingw32
## 清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/
## 中国科学技术大学
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/
## Server = http://repo.msys2.org/mingw/i686/
## Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
## Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/
## Server = https://mirror.yandex.ru/mirrors/msys2/mingw/i686/
(2)C:\msys32\etc\pacman.d\mirrorlist.mingw64
## 清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/
## 中国科学技术大学
Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
## Server = http://repo.msys2.org/mingw/x86_64/
## Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
## Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64/
## Server = https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/
(3)C:\msys32\etc\pacman.d\mirrorlist.msys
## 清华大学
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch/
## 中国科学技术大学
Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/
## Server = http://repo.msys2.org/msys/$arch/
## Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/$arch/
## Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
## Server = https://mirror.yandex.ru/mirrors/msys2/msys/$arch/
查看可用的安装包:
# pacman -Sl | grep gtk3
mingw32 mingw-w64-i686-gtk3 3.24.8-1
mingw64 mingw-w64-x86_64-gtk3 3.24.8-1
安装GTK2:
pacman -S mingw-w64-i686-gtk2 //32位
pacman -S mingw-w64-x86_64-gtk2 //64位
安装GTK3:
pacman -S mingw-w64-i686-gtk3 //32位
pacman -S mingw-w64-x86_64-gtk3 //64位
运行gtk-demo.exe和gtk3-demo.exe确认gtk是否已正确安装。
安装gcc:
pacman -S mingw-w64-i686-gcc //32位
pacman -S mingw-w64-x86_64-gcc //64位
安装make:
pacman -S make //自动根据本地电脑选择32位或者64位
安装pkg-config:
pacman -S pkg-config