Mingw ошибка при установке

Long story short, the official installer is broken and not been fixed for years, so we have to install it manually.


installer_download_link

The official download link above would bring you to sourceforge: https://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/mingw-w64-install.exe

And in the same folder that contains the installer, there’s a repository.txt. (about this file)
repository

Take a look at it, the installer basically just download and unzip the build from one of these urls within repository.txt. Choose the url you want and download/upzip it manually. (In my case, I use 8.1.0|x86_64|posix|seh|rev0 setup)
repository.txt

Last, setup the Path environment variable pointing to your unzipped bin folder, let say C:mingw64bin, and this should do the trick.

Recently I installed Clion, but couldn’t compile even «Hello World» application.
I install MinGW compiller separately, but when I try to compile «Hello world» app I have next errors:

In file included from c:mingwincludewchar.h:45:0,
                 from c:mingwlibgccmingw324.8.1includec++cwchar:44,
                 from c:mingwlibgccmingw324.8.1includec++bitspostypes.h:40,
                 from c:mingwlibgccmingw324.8.1includec++iosfwd:40,
                 from c:mingwlibgccmingw324.8.1includec++ios:38,
                 from c:mingwlibgccmingw324.8.1includec++ostream:38,
                 from c:mingwlibgccmingw324.8.1includec++iostream:39,
                 from C:UsersAlexandrClionProjectsuntitled2main.cpp:1:
c:mingwincludewctype.h:67:1: error: '_CRTIMP' does not name a type
 _CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
 ^
...........
 ^
c:mingwincludewctype.h:76:1: error: '_CRTIMP' does not name a type
 _CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
 ^
c:mingwincludewctype.h:77:1: error: '_CRTIMP' does not name a type
 _CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
 ^
c:mingwincludewctype.h:80:1: error: '_CRTIMP' does not name a type
 _CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
 ^
c:mingwincludewctype.h:84:29: error: expected initializer before 'iswblank'
 int __cdecl __MINGW_NOTHROW iswblank (wint_t);
                             ^
c:mingwincludewctype.h:90:1: error: '_CRTIMP' does not name a type
 _CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
 ^
c:mingwincludewctype.h:91:1: error: '_CRTIMP' does not name a type
 _CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
 ^
c:mingwincludewctype.h:93:1: error: '_CRTIMP' does not name a type
 _CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
 ^
c:mingwincludewctype.h:157:33: error: expected initializer before 'towctrans'
 wint_t __cdecl __MINGW_NOTHROW  towctrans(wint_t, wctrans_t);
                                 ^
c:mingwincludewctype.h:158:35: error: expected initializer before 'wctrans'
 wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*);
                                   ^
c:mingwincludewctype.h:159:34: error: expected initializer before 'wctype'
 wctype_t __cdecl __MINGW_NOTHROW wctype(const char*);

How can I fix it?

asked Oct 17, 2015 at 18:29

V. Panchenko's user avatar

I just installed a fresh copy of MingW correctly and selected a lot of package to install, after that you install CLion 1.1.1 and set the path to c:MingWbin to your environment variable PATH

Inslall link for MingW: http://sourceforge.net/projects/mingw/files/

I created a hello project and compiled it, all things works correctly

Here is the result of execution of hello world and there is no compiler problem

If there is a path problem, as I had, you have to de-install and install CLion to recognize your path as I did

enter image description here

Tested under windows 7

answered Oct 17, 2015 at 22:13

HDJEMAI's user avatar

HDJEMAIHDJEMAI

9,36746 gold badges67 silver badges92 bronze badges

3

Привет, вы моя последняя надежда, я тут решил развиваться в плане информационной сферы ( начал смотреть курсы на ютубе) , и всё как бы шло неплохо пока я не столкнулся с проблемой при установке софта. Конкретно при автоматической установке компилятора для С (ming windows), он выдает ошибку

«mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-0.6.2-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/mingw/mingw-get-setup-… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-setup-… download failed
mingw-get: *** WARNING *** prdownloads.sourceforge.net/minw/mingw-get-setup-0… opened with unexpected status: code = 403
mingw-get: *** WARNING *** please report this to the mingw-get maintainer
mingw-get: *** ERROR *** Get package: prdownloads.sourceforge.net/mingw/mingw-get-setup-… download failed
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-gui.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-lic.tar.xz»

При попытке ручной установки он в любом случае перебрасывает на «sourceforge.net» который выдает ошибку «The sourceforge.net website is temporarily in static offline mode».

Большая проблема в том что видео-уроки 2014 года и возможно и возможно многое изменилось с того времени. Да , я очень долго и нудно искал как исправить эту проблему, но даже тут ссылки находятся на sourceforge.net который не открывает ссылку на тему а выдает ошибку. У меня сейчас это засело в душе и голове и мне правда хочется научиться, но тут вот так случилось. Прошу помощи людей которые в этом понимают,не знаю можно ли кидать ссылки ( точнее я прочитал в правилах но не уверен), поэтому кину:D

https://sourceforge.net/home.html

www.mingw.org

Cover image for Installing MinGW W64 with FFMPEG on Windows and fixing the weird "file downloaded incorrectly" error.

So guys 🙂 MinGW-w64 is a library you might come across as a dependency to some other software you’re installing.

It appears to have grown in popularity over the years, despite the fact that it seems like the official ORG website has been outdated for quite some time.

MinGW is a dependency for many other computer programs in wide use, such as FFmpeg (for encoding files in video format) which is what I needed to install it for.

And since I had to install MinGW on my Windows PC for just that very purpose (encoding and saving videos in different file formats) I decided to do a write up.

You may have found this MinGW setup article for a completely different reason and I can totally understand it! Still the MinGW-w64 installation process will be similar.

Below what I found was probably the best MinGW installation video. So there is this bug or just some admin rights issue, but many devs (myself included) stumbled over «File Has Been Downloaded Incorrectly» error. And this video helps solve it.

(How to install MinGW W64 on Windows and fix the dreaded «File has been downloaded incorrectly» setup error.)

If you’re someone who learns better from visual instructions, it’s probably a good idea to watch this MinGW video first.

But the battle isn’t over yet. For me, I also had to install it together with FFmpeg. And if that’s what you’re trying to do, here’s the entire list of step by step instructions I’ve composed in my notes:

Installing MinGW for use with FFMpeg

For those like me, who are installing FFMpeg, here’s a more detailed setup process:

  1. Download the latest msys2 installer from http://msys2.org/ and run it.
  2. Follow the instructions on the screen to complete the installation.
  3. Start msys2 by double-clicking on the shortcut created in your start menu or desktop.
  4. In the msys2 shell, update the package repositories with the following command:

pacman -Syu

  1. Exit the msys2 shell and restart it.
  2. In the msys2 shell, install mingw w64 with one of the following commands:

pacman -S mingw-w64-i686-toolchain

or

pacman -S mingw-w64-x86_64-toolchain

  1. You can now find the mingw w64 compiler binaries in the /mingw32/bin and /mingw64/bin directories.

  2. In the msys2 shell, install cmake with the following command:

pacman -S cmake

  1. In the msys2 shell, install make with the following command:

pacman -S make

  1. In the msys2 shell, install git with the following command:

pacman -S git

  1. In the msys2 shell, install vim with the following command:

pacman -S vim

  1. You can now find the cmake, make, and git binaries in the /usr/bin directory.
  2. In the msys2 shell, change to the directory where you want the FFmpeg source code to be downloaded. For example:

cd /c/ffmpeg-source

  1. In the msys2 shell, clone the FFmpeg git repository with the following command:

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

  1. This will create a directory named ffmpeg in the current directory, which contains the FFmpeg source code.
  2. In the msys2 shell, change to the newly created ffmpeg directory:

cd ffmpeg

  1. Run the following command to configure FFmpeg for building:

./configure --enable-shared --disable-static --disable-debug --disable-doc

  1. Run the following command to build FFmpeg:

make -j4

  1. Run the following command to install FFmpeg:

make install

  1. This will build and install FFmpeg into your msys2 installation directory, which is typically C:msys64usr. Notice that we’re not using sudo here, because we installed FFmpeg into our own directory, not into a system directory.
  2. You can check that FFmpeg was installed correctly by running the following command:

ffmpeg -version

You should see output similar to the following:

ffmpeg version 0.10.15-6:0.10.15-1~deb7u1, Copyright (c)

Phew! Finally.

So this is pretty much why I wrote this article, to document the process and hopefully it helps someone going through the same 🙂

Oh and in some cases you might also want to install MinGW with MSYS2. (because there is a way to install it without MSYS2, but this case is probably a lot more rare for devs.)

Installing MinGW-w64 With MSYS2

You can install the MSYS2 MinGW-w64 compiler toolchain on your system without using MSYS2 by following these instructions:

  1. Download and install the MSYS2 base installer from https://www.msys2.org/.
  2. Start the MSYS2 MinGW-w64 shell from the start menu.
  3. Run pacman -S mingw-w64-x86_64-toolchain to install the toolchain.
  4. Run pacman -S mingw-w64-x86_64-cmake to install CMake.
  5. Follow the instructions in the README to build your software.
  6. When you’re done, close the MSYS2 MinGW-w64 shell.

Installing MinGW-w64 Without MSYS2

You can also use the MSYS2 MinGW-w64 compiler toolchain from the command line without using MSYS2 by following these instructions:

  1. Download and install the MSYS2 base installer from https://www.msys2.org/.
  2. Start the MSYS2 MinGW-w64 shell from the start menu.
  3. Run pacman -S mingw-w64-x86_64-toolchain to install the toolchain.
  4. Follow the instructions in the README to build your software.
  5. When you’re done, close the MSYS2 MinGW-w64 shell.

55 / 13 / 2

Регистрация: 26.10.2014

Сообщений: 1,106

1

21.03.2017, 15:52. Показов 8423. Ответов 8


Студворк — интернет-сервис помощи студентам

Здравствуйте.
Не устанавливается MinGW.
Система: Windows XP
Лог:
mingw-get: *** ERROR *** http://prdownloads.sourceforge… oad:cannot open URL
mingw-get: *** ERROR *** Get package: http://prdownloads.sourceforge… ?download: download failed
mingw-get: *** ERROR *** http://prdownloads.sourceforge… oad:cannot open URL
mingw-get: *** ERROR *** Get package: http://prdownloads.sourceforge… ?download: download failed
mingw-get: *** ERROR *** http://prdownloads.sourceforge… oad:cannot open URL
mingw-get: *** ERROR *** Get package: http://prdownloads.sourceforge… ?download: download failed
mingw-get: *** ERROR *** http://prdownloads.sourceforge… oad:cannot open URL
mingw-get: *** ERROR *** Get package: http://prdownloads.sourceforge… ?download: download failed
mingw-get: *** ERROR *** http://prdownloads.sourceforge… oad:cannot open URL
mingw-get: *** ERROR *** Get package: http://prdownloads.sourceforge… ?download: download failed
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-gui.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-0.6.2-mingw32-beta-20131004-1-lic.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-setup-0.6.2-mingw32-beta-20131004-1-dll.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** INFO *** setup: unpacking mingw-get-setup-0.6.2-mingw32-beta-20131004-1-xml.tar.xz
mingw-get: *** ERROR *** unpack: required archive file is not available
mingw-get: *** ERROR *** unpack: aborted due to previous download failure
mingw-get: *** ERROR *** setup: unable to continue

В чём причина?
Заранее благодарен!



0



1272 / 1029 / 470

Регистрация: 25.12.2016

Сообщений: 3,333

21.03.2017, 21:31

2

Устанавливается exe-инсталлятор с оф. сайта?



0



55 / 13 / 2

Регистрация: 26.10.2014

Сообщений: 1,106

22.03.2017, 01:34

 [ТС]

3

Да. С сайта перешел на sourceforge, там скачал.



0



1272 / 1029 / 470

Регистрация: 25.12.2016

Сообщений: 3,333

22.03.2017, 09:34

4

Попробуйте скачать ещё раз, может в первый раз оно криво скачалось.



0



1786 / 1036 / 445

Регистрация: 12.05.2016

Сообщений: 2,550

22.03.2017, 09:41

5

jonikster, интернет на пк есть, когда устанавливаете? Если с браузера зайти по ссылкам что пишет?



0



55 / 13 / 2

Регистрация: 26.10.2014

Сообщений: 1,106

22.03.2017, 12:46

 [ТС]

6

Интернет есть, перекачивал.
Как я понял он не может подключится к серверу загрузки.



0



4 / 4 / 0

Регистрация: 07.08.2015

Сообщений: 97

19.12.2018, 12:01

7

Здравствуйте, та же проблема. Подскажите, люди добрые, нашел кто-нибудь решение?



0



47 / 86 / 11

Регистрация: 12.08.2013

Сообщений: 460

04.01.2019, 02:53

8

Цитата
Сообщение от antlantis
Посмотреть сообщение

Здравствуйте, та же проблема. Подскажите, люди добрые, нашел кто-нибудь решение?

Не проще ли под винду использовать pelles c?



0



219 / 16 / 0

Регистрация: 15.08.2016

Сообщений: 38

06.02.2019, 11:24

9

Лучше использовать MinGW-W64. Там скачивается .7z архив ~50 Мб и нет проблем. Тоже не смог скачать MinGW, хотя интернет 100 Мбит/с. Online-инсталлятор = хрень.



0



  • Miner restarted after error raveos ошибка
  • Missing framebuffer object extension как исправить эту ошибку
  • Missing expression oracle ошибка
  • Missing equal sign ошибка
  • Missing data ошибка принтера