Source Configuration for MSYS2

Source: Internet
Author: User

Source Configuration for MSYS2
The article about MSYS2 can refer to the following links, I do not repeat:

MSYS2 Installation Notes
MSYS2 + mingw-w64 + Git + gVim environment configuration
MSYS2 Environment Construction
MSYS2 installation g++: Pacman-s mingw-w64-x86_64-toolchain Mingw-w64-i686-toolchain
Due to GFW mischief, the source of access to SF is not stable, I recommend the use of Beijing Polytechnic University Image:

http://mirror.bit.edu.cn/msys2/REPOS/

Modify the Msys2 installation directory of the \ETC\PACMAN.D folder inside the 3 mirrorlist.* files, leaf out add the image and then update

http://www.rswiki.org/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1/msys2?rev=1416044574

Copy Code

### # MSYS2 Repository mirrorlist# Changed on 2014-11-15### #中国科学技术大学开源软件镜像Server =http://mirrors.ustc.edu.cn/msys2/repos/msys2/$arch# #北京理工大学镜像Server =http://mirror.bit.edu.cn/msys2/repos/msys2/$arch# #日本北陆先端科学技术大学院大学 SourceForge MirrorServer =http://jaist.dl.sourceforge.net/project/msys2/repos/msys2/$arch# #The UK Mirror Service Sourceforge MirrorServer =http://www.mirrorservice.org/sites /download.sourceforge.net/pub/sourceforge/m /ms/msys2/repos/MSYS2/ $arch ## primaryServer = ftp://148.251.42.38/MSYS2/  $arch ## sourceforge.net Server = http://downloads.sourceforge.net/project/msys2/repos/msys2/  $arch             
### # 64-bit MINGW-W64 repository Mirrorlist# Changed on 2014-11-15### #中国科学技术大学开源软件镜像Server = Http://mirrors.ustc.edu.cn/ Msys2/repos/mingw/x86_64# #北京理工大学镜像Server = Http:// Mirror.bit.edu.cn/msys2/repos/mingw/x86_64# #日本北陆先端科学技术大学院大学 sourceforge mirror server = Http://jaist.dl.sourceforge.net/project/msys2/repos/mingw/x86_64# #The UK Mirror Service Sourceforge mirrorserver = Http:// Www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/ms/msys2/repos/mingw/x86_64## primaryserver = Ftp://148.251.42.38/mingw/x86_64## sourceforge.netserver = Http://downloads.sourceforge.net/project /msys2/repos/mingw/x86_64            
### # 32-bit MINGW-W64 repository Mirrorlist# Changed on 2014-11-15### #中国科学技术大学开源软件镜像Server = Http://mirrors.ustc.edu.cn/ Msys2/repos/mingw/i686# #北京理工大学镜像Server = Http:// Mirror.bit.edu.cn/msys2/repos/mingw/i686# #日本北陆先端科学技术大学院大学 sourceforge mirror server = Http://jaist.dl.sourceforge.net/project/msys2/repos/mingw/i686 # #The UK Mirror Service Sourceforge mirrorserver = Http:// Www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/m/ms/msys2/repos/mingw/i686## primaryserver = Ftp://148.251.42.38/mingw/i686## sourceforge.netserver = Http://downloads.sourceforge.net/project /msys2/repos/mingw/i686            

MSYS2 itself is driven by Cygwin, but it is developed directly using MINGW64, so the compiled program is a native Windows program. We can go directly up and down from source force to
MSYS2:
http://sourceforge.net/projects/msys2/
MINGW64:
http://sourceforge.net/projects/mingw-w64/
After downloading, they install to the same folder (for example, C:\MSYS2) can work, note that the platform to install MINGW64 x86_64 instead of i686, so that you can get 64-bit program compiler ability, but it also means that your library is 64-bit, So if you want to develop 32-bit and 64-bit programs at the same time, you need to install two times, a select x86_64, a choice of i686.
MSYS2 introduced the Pacman Package manager in Arch Linux, which solves the problem of library dependencies when we install the software, finds the batch file Mingw64_shell.bat in the MSYS2 installation directory, and can enter the MSYS2 environment, you can put the \ The Usr\bin and \mingw64\bin directories are added to the path so that you can use them on your windows own command line.
First we enter the command Pacman-syu to update the system completely, if you install some new packages later, this command will also help you to update the package you installed. If the foreign server network is too slow to add the Zhong ke image to the Pacman mirrorlist file, see Https://lug.ustc.edu.cn/wiki/mirrors/help/msys2. But the image of the file may be some incomplete, but I feel that the source force speed is still possible, so when the Zhong Ke image does not have a file, its own FTP is not connected, and finally connected to the source force.
You can enter PACMAN-SL to view the packages that can be installed, use PACMAN-SS to blur the search, pacman-q to list the packages that have been installed, and various commands can be used pacman-h to get help:
$ pacman-h
Usage: Pacman < operation > [...]
Operation:
Pacman {-h–help}
Pacman {-v–version}
Pacman {-d–database} < options > < packages >
Pacman {-q–query} [options] [package]
Pacman {-r–remove} [options] < packages >
Pacman {-s–sync} [options] [package]
Pacman {-t–deptest} [options] [package]
Pacman {-u–upgrade} [options] < files >

Use ' Pacman {-h–help} ' and an action to view available options
If you want to install the package, you can use the Pacman-s package name, all package names will be displayed in the PACMAN-SL, the individual recommended packages installed are: git,man,make,mingw-w64-x86_64-boost,mingw-w64-x86_64- Gsl Note that the tool can be loaded msys but the library or scripting language must be installed mingw-w64-x86_64, because this is not only more complete and more efficient implementation.
If the package encounters a file conflict (which should be unknown to our pre-installed Mingw64,pacman), you can use the –force option to force the installation. It is not recommended to use Pacman directly to install MINGW-W64-X86_64-GCC because the Toolset does not work under Windows, and it also has a Python2, which is a very bad thing for us Python3 parties.
Of course you can install the Mingw-w64-x86_64-python3 package directly, but I'm still more accustomed to using the official Python version of Windows directly, But the advantage here is that it can help you install the latest scipy without the need to drag the installation package down to SciPy's official web site. Enter Pacman-s mingw-w64-x86_64-python3-scipy, and it will help you solve the numpy dependency problem.
If you need to update package Pacman-sy, this command can also be loaded directly.
Since the official QT does not provide MINGW64 version, it only VC and MINGW32 version, so mingw64 Qt is now used MSYS2 is the simplest way, you enter Pacman-s mingw-w64-x86_64-qt5 on it. Then go to the QT website to download a qtcreator, configure your own build system, in the menu bar tools-Options-build and run and version control to set it. The files that need to be populated include qmake,g++,gdb,git, which can be found in both the \mingw64\bin and \usr\bin folders.
Finally, the way to create a shortcut in the taskbar, you can go directly to the \usr\ Bin found Mintty.exe It is a better feature of Windows under the terminal, drag it to the taskbar fixed, note that the default font is too small to adjust in the Option-text, it is recommended to use Consolas 16th font. Then right click on the taskbar shortcut and then right-terminal, left-click Properties, the target changed to:
(.... \usr\bin\mintty.exe this piece do not move directly add back parameters)-i/msys2.ico env msystem=mingw64 bash-l-I
Then you can quickly start the MSYS2 terminal directly on the taskbar.

http://blog.csdn.net/jiutianhe/article/details/47608651

Source Configuration for MSYS2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.