I use MXE. Follow these instructions https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows/14170591#14170591
My actions:
git clone https://github.com/mxe/mxe.git cd mxe make qtbase At the end of the qtbase compilation, an error is displayed:
Failed to build package qtbase for target i686-w64-mingw32.static! ------------------------------------------------------------ or compile needed modules into the library. ERROR: Feature 'sql-psql' was enabled, but the pre-condition 'libs.psql' failed. make[1]: *** [build-only-qtbase_i686-w64-mingw32.static] Ошибка 3 make[1]: Выход из каталога `/home/homa/setup/mxe' real 3m24.062s user 3m12.616s sys 0m13.024s ------------------------------------------------------------ [log] /home/homa/setup/mxe/log/qtbase_i686-w64-mingw32.static make: *** [/home/homa/setup/mxe/usr/i686-w64-mingw32.static/installed/qtbase] Ошибка 1 As I understand it, it requires postgresql, but I do not need it. The http://mxe.cc/#requirements dependencies are already installed. Ubuntu OS 14.04 LTS.
make qtbasewith how and what features you include. - 0andriy