MRtrix3 compiling Qt fails to find -lmingw32

Hi! I am trying to configure MRtrix3 on Windows 10 with MSYS2.
However, when it comes to configuring qt it fails and configure.log contains the following error:

CMD: g++ -Wl,--sort-common,--as-needed -pthread -Wl,--allow-multiple-definition -L/mingw64/lib -lz -ltiff -lfftw3 qt_moc.o qt.o -o qt -Wl,-s,--relax,--gc-sections -Wl,-subsystem,windows -mthreads -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -LC:/msys64/mingw64/lib C:/msys64/mingw64/lib/libqtmain.a -lshell32 C:/msys64/mingw64/lib/libQt5OpenGL.dll.a C:/msys64/mingw64/lib/libQt5Svg.dll.a C:/msys64/mingw64/lib/libQt5Widgets.dll.a C:/msys64/mingw64/lib/libQt5Gui.dll.a C:/msys64/mingw64/lib/libQt5Core.dll.a
/usr/lib/gcc/x86_64-pc-msys/7.3.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lmingw32
collect2: error: ld returned 1 exit status

I don’t really understand how to fix that as there is no mingw32 binary which I could link.
Could anyone, please, help?

This might be due to using the wrong MSYS2 shell. As noted in the instructions, it’s really important to use the 64 bit version of the MSYS2 shell. Try that, see if it helps…

1 Like