Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
MinGW: Difference between revisions
No edit summary |
(Make it explicit that 32 bit MinGW wasn't supported in Qt 6.) |
||
Line 49: | Line 49: | ||
|[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.3.0/threads-posix/dwarf/i686-7.3.0-release-posix-dwarf-rt_v5-rev0.7z/download mingw-builds i686-7.3.0-release-posix-dwarf-rt_v5-rev0], [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-posix/seh/x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z/download mingw-builds x86_64-7.3.0-release-posix-seh-rt_v5-rev0] | |[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/7.3.0/threads-posix/dwarf/i686-7.3.0-release-posix-dwarf-rt_v5-rev0.7z/download mingw-builds i686-7.3.0-release-posix-dwarf-rt_v5-rev0], [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-posix/seh/x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z/download mingw-builds x86_64-7.3.0-release-posix-seh-rt_v5-rev0] | ||
|- | |- | ||
|Qt 5.15 | |Qt 5.15 | ||
|[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z/download mingw-builds i686-8.1.0-release-posix-dwarf-rt_v6-rev0], [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download mingw-builds x86_64-8.1.0-release-posix-seh-rt_v6-rev0] | |[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z/download mingw-builds i686-8.1.0-release-posix-dwarf-rt_v6-rev0], [https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download mingw-builds x86_64-8.1.0-release-posix-seh-rt_v6-rev0] | ||
|- | |||
|Qt 6.0, Qt 6.1, Qt 6.2.0, Qt 6.2.1 | |||
|[https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download mingw-builds x86_64-8.1.0-release-posix-seh-rt_v6-rev0] | |||
|- | |- | ||
|Qt 6.2.2, 6.2.3, 6.2.4 | |Qt 6.2.2, 6.2.3, 6.2.4 |
Latest revision as of 09:35, 21 July 2023
En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh
MinGW is a free and open source Windows port of the GCC compiler and related tools. Qt supports MinGW as a platform on Windows in addition to Visual Studio compiler by Microsoft. However, it can also be used as a cross-compiler e.g. on Unix (currently not officially supported).
Qt Creator supports compiling with a MinGW toolchain out of the box.
MinGW distributions and versions
There are actually different MinGW toolchains and packages available:
MinGW.org is the original project. The latest version gcc 4.7.2. It only compiles for 32 bit binaries.
MinGW-w64 [mingw-w64.sourceforge.net] is a fork with the original aim to also support generation of 64 bit binaries. By now it also supports a much larger part of the Win32 API. The MinGW-w64 project does host several different binary packages, done by different people.
There are binary installers targetting MinGW for both Qt 4 and Qt 5. Up to Qt 4.8.6, Qt 4 ones are built with a MinGW.org toolchain using gcc 4.4. Newer Qt 4.8 binary packages ship with a mingw-w64 based toolchain. For Qt 5, a newer MinGW-w64 toolchain is actually required.
Toolchains used in Qt binary packages
Common problems
Link error 'Undefined reference to _Unwind_Resume'
This error occurs if object files / libraries being linked are compiled with different versions of mingw. The following steps can fix a problem:
- Execute in order to remove all object files that was compiled with different mings versions.
mingw32-make distclean
- Explicitly set library path by setting environment variable, for example
LIBRARY_PATH
. gcc linker have a very complicated library search algorithm[1] that can result in wrong library being linked (for example, mingw can find installation of strawberry perl in PATH and use it's library).set LIBRARY_PATH=c:\mingw\lib