Anyone hae a reliable link to download mingw?
Bob Keane

I had to reinstall my laptop due to performance and my backup of MINGW got corrupted. When I download from this site, the download box pops up giving me the option to open with Applications\7zG.exe or save the file. I tried saving but the file show as a 7z file. If I try unpacking it, the option to unpack is not there. Does anyone have a more reliable source to download the file, or should I keep trying? I've been banging my head against this wall since Saturday.

Edgar Reynaldo

I suggest you use a more modern version of MinGW than vanilla MinGW from sourceforge.

Try the MinGW-W64 project. There are recent versions available on sourceforge. You can also get cutting edge gcc on .

Bob Keane

I tried downloading the mingw i686 version 8.10 rev 7 with posix and dwarf files but had the problem. But while you are reading the thread Edgar, that is the correct compiler for using your Allegro binaries, correct?

Edgar Reynaldo

My latest binaries for Allegro can be found on my Eagle release page here :

The compiler I used is noted in the release notes.

If you're having the same problem you might want to try reinstalling 7-zip.


Bob Keane


Neil Roy

The last MinGW I downloaded was just the other day from the following site...

It's fairly up to date with some extras included. I haven't honestly tested it yet, the last version I had on my system was GCC 8.7. This site has GCC 11.2.0 which sounds nice.


I've made a post here as a reminder for myself.

Contents of the reminder:

I’ve set up my last allegro 5 install + compilers in less than 15 minutes.

1) download and install msys2 ( )

Now launch the msys2 terminal and copy pasta the followings:

pacman -Syu
pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain git subversion mercurial mingw-w64-i686-cmake mingw-w64-x86_64-cmake
pacman -Sy mingw32/mingw-w64-i686-allegro mingw64/mingw-w64-x86_64-allegro
pacman -Sy mingw-w64-i686-dumb mingw-w64-i686-flac mingw-w64-i686-opusfile mingw-w64-i686-freetype mingw-w64-i686-libjpeg-turbo mingw-w64-i686-libpng mingw-w64-i686-libvorbis mingw-w64-i686-libwebp mingw-w64-i686-openal mingw-w64-i686-physfs
pacman -Sy mingw-w64-x86_64-dumb mingw-w64-x86_64-flac mingw-w64-x86_64-opusfile mingw-w64-x86_64-freetype mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libwebp mingw-w64-x86_64-openal mingw-w64-x86_64-physfs

Bob Keane

Getting closer. I removed and reinstalled 7zip three or four times and got it to unzip the files properly. I tried compiling a simple program which worked prior to the restore but got undefined references to al_install_system, al_install_primitives, etc. Stack overflow suggests thesse are due to incompatible compiler/Allegro versions, so I deleted the files and downloaded the compiler and Allegro from Edgar's link. No change. I'll look again this weekend.

Edgar Reynaldo

undefined references come from not linking properly. My binaries only come with the monolith libraries, so you need to link to those.

Bob Keane

Apparently I'm following an outdated guide. What are the correct libraries and which order should they be in?

<edit> While looking up information on using the monoliths, I found references to #DEFINE STATIC LINK. Is that necessary in every file?


If you want to compile your code without having an extra dll file, yes. Normally you would define that in your build process or a common header file though.

I think with GCC, I haven't touch it in a long time so I may be wrong, the switch when compiling a C or C++ file would be -DSTATIC_LINK

Edgar Reynaldo

Pass it as a switch when compiling. -DALLEGRO_STATIC_LINK

monolith has nothing to do with dynamic or static. There is a different .a for each.

Bob Keane

Thanks for the help. I got it to work without -DALLEGRO-STATIC-LINK. I'm using Code::Blocks, so I wouldn't know how to set it up for now. Is it important?


Only if you don't want to include the dll file in your release.

Seeing as you'll most likely have other files, I'm not sure there's a real benefit one way or the other if you only have one exe file.

Linux on the other hand, you'll have it so the end user won't need sudo to install Allegro (and other libraries) if they're not already installed. I don't think many, if any, distros are configured to include a library from the program's directory.

Bob Keane

I copied the list of libraries and list order from this thread but I get an "execution cannot proceed because libpng16.dll was not found error when running. I checked the Allegro 5 libs, there is a libpng16.dll.a file included. Any thoughts?

<edit> I figured it out. ...I think. Edgar's guide included with his binaries suggest linking to libgcc.a, however that library is in a subdirectory labelled gcc. There is a libgcc_s.a in the parent directory,\Mingw\winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r3\mingw64\lib, which appears to be static. When using the -D_STATICLINK option under the "other linker options", linking to the -static-libcc.a and -static-libg++.a options are unnecessary. Code:: Blocks will prompt you to set the flag for static linking when you add the -D_STATICLINK option. Food for the wise.

Thread #618589. Printed from