Active6 months ago
I am trying to build some open source library. I need package management system to easily download the dependencies. At first I am using
MinGW+MSYS
. But the included packages are limited. Someone told me to use MinGW-w64 + MSYS2
.This wiki is not a forum for discussion of usage issues. Please use the [email protected] list instead. We do not allow creation of comments by anonymous or untrusted users, on any page.
I downloaded the
mingw-w64-install
from here. When running, it reports the following error. How to fix it?And btw, from the
MinGW-w64
download page, I see a lot of download links. Even Cygwin is listed. How Cygwin
and MinGW-w64
are related?My current understanding is, in the time of
MinGW+MSYS
, MSYS is just a nice addon to MinGW, while in MinGW-w64 + MSYS2
, MSYS2 is standalone and MinGW-w64 is just a set of libraries it can work with. Just like Cygwin can download many different packges.smwikipedia
23.8k69 gold badges228 silver badges391 bronze badges
2 Answers
Unfortunately, the MinGW-w64 installer you used sometimes has this issue. I myself am not sure about why this happens (I think it has something to do with Sourceforge URL redirection or whatever that the installer currently can't handle properly enough).
Anyways, if you're already planning on using MSYS2, there's no need for that installer.
- Download MSYS2 from this page (choose 32 or 64-bit according to what version of Windows you are going to use it on, not what kind of executables you want to build, both versions can build both 32 and 64-bit binaries).
- After the install completes, click on the newly created 'MSYS2 Shell' option under either
MSYS2 64-bit
orMSYS2 32-bit
in the Start menu. Update MSYS2 according to the wiki (although I just do apacman -Syu
, ignore all errors and close the window and open a new one, this is not recommended and you should do what the wiki page says). - Install a toolchaina) for 32-bit:b) for 64-bit:
- install any libraries/tools you may need. You can search the repositories by doinge.g.and install usinge.g.and from then on the GSL library is automatically found by your MinGW-w64 64-bit compiler!
- Open a MinGW-w64 shell:a) To build 32-bit things, open the 'MinGW-w64 32-bit Shell'b) To build 64-bit things, open the 'MinGW-w64 64-bit Shell'
- Verify that the compiler is working by doing
If you want to use the toolchains (with installed libraries) outside of the MSYS2 environment, all you need to do is add
M.M<MSYS2 root>/mingw32/bin
or <MSYS2 root>/mingw64/bin
to your PATH
.110k14 gold badges134 silver badges255 bronze badges
rubenvbrubenvb55.8k24 gold badges146 silver badges266 bronze badges
MSYS has not been updated a long time, MSYS2 is more active, you can download from MSYS2, it has both
mingw
and cygwin fork
package.To install the MinGW-w64 toolchain (Reference):
- Open MSYS2 shell from start menu
- Run
pacman -Sy pacman
to update the package database - Re-open the shell, run
pacman -Syu
to update the package database and core system packages - Re-open the shell, run
pacman -Su
to update the rest - Install compiler:
- For 32-bit target, run
pacman -S mingw-w64-i686-toolchain
- For 64-bit target, run
pacman -S mingw-w64-x86_64-toolchain
- For 32-bit target, run
- Select which package to install, default is all
- You may also need
make
, runpacman -S make
110k14 gold badges134 silver badges255 bronze badges
Steely WingSteely Wing9,4313 gold badges44 silver badges45 bronze badges
![Manager Manager](/uploads/1/2/5/3/125307128/141109332.jpg)
Not the answer you're looking for? Browse other questions tagged cygwinmingwmsysmingw-w64msys2 or ask your own question.
Active2 months ago
I'm looking forward to use Visual Studio Code for C++ Programming. I installed MinGW Installation Manager for Windows (32 bit - Windows 7). In that, I installed the following packages -
- mingw-developer-toolkit (and all other packages that install automatically with it)
- mingw32-base
- mingw32-gcc-g++ (and all other packages that install automatically with it)
Mingw Installation Manager Download Latest Version
When I click [Menu] Installation > Apply Changes > Apply, the packages start downloading but after some time, an error occurs:
I tried deleting the cache files and running MinGW Installation Manager as administrator, but the error persists.
Is there a way with which I can avoid this error, or is there any other way to do C++ Programming in Visual Studio Code (as I like this Editor) ?
李哲源51.2k15 gold badges111 silver badges164 bronze badges
Aditya SinghAditya Singh
2 Answers
Definitely, Visual Studio handles many features.
One of which is having it's own compiler preconfigured to run on Visual Studio.To use it you can select C++ project when creating a new project. If you can not see a C++ project category, you should have a 'link' that directs you to a tool downloading page where you can look for c++.
Feedforward2,5994 gold badges15 silver badges29 bronze badges
GarbageGarbage
Please see here: https://sourceforge.net/p/mingw/bugs/2340/
TL;DR - SourceForge has an issue with certs which prevents some versions of Windows from downloading from it using MinGW (I encountered this issue on 32-bit XP).
You can however get the packages you need manually. Just put them in
$MINGW_ROOT/var/cache/mingw-get/packages
(where mingw-get.exe itself is in
$MINGW_ROOT/bin
). The MinGW GUI will check this location first before trying to fetch from the SourceForge source. Here is an easy list of all packages: https://qa.debian.org/watch/sf.php/mingwYou can create an
.lst
file of all URLs and just grab everything (it's about 900 MB of data) and then use this command to download all:wget --no-check-certificate -i MinGW32.lst
riordantriordant