[Qbs] Mingw issues

Alberto Mardegan mardy at users.sourceforge.net
Sun Apr 5 18:52:50 CEST 2020


Hi all!
  I've a feeling I've met this problem before, but I cannot remember
what the solution was. So here I am again :-)

I'm trying to build an application for Linux, using QBS with MXE. I've
setup my toolchain like this:

MXE_DIR=/mnt/Lavoro/mxe/mxe-qt5.9
qbs setup-toolchains $MXE_DIR/usr/bin/i686-w64-mingw32.static-g++
mxe-i686-w64-mingw32.static

# The above didn't recognize my compiler, so these two were needed:
qbs config
profiles.mxe-i686-w64-mingw32-static.cpp.cxxCompilerName:i686-w64-mingw32.static-g++
qbs config
profiles.mxe-i686-w64-mingw32-static.cpp.cCompilerName:i686-w64-mingw32.static-gcc

# Then, add Qt:
qbs setup-qt $MXE_DIR/usr/i686-w64-mingw32.static/qt5/bin/qmake
mxe-qt59-i686-w64-mingw32-static

# use the MXE toolchain:
qbs config
profiles.mxe-qt59-i686-w64-mingw32-static.baseProfile:profiles.mxe-i686-w64-mingw32-static

But then, when I run qbs on my program, it spits out a few errors:

================
Build graph does not yet exist for configuration 'default'. Starting
from scratch.
Resolving project for configuration default
Setting up Qt at
'/mnt/Lavoro/mxe/mxe-qt5.9/usr/i686-w64-mingw32.static/qt5/bin/qmake'...
Qt was set up successfully.
ERROR: /home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:3:1 Error
while handling product 'Mappero':
/home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:61:5 Module Qt.core
could not be loaded.
/home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:62:5 Module Qt.gui
could not be loaded.
/home/mardy/src/git/mappero/lib/Mappero/Mappero.qbs:63:5 Module Qt.qml
could not be loaded.
/home/mardy/src/git/mappero/lib/MapperoUi/MapperoUi.qbs:3:1 Error while
handling product 'MapperoUi':
/home/mardy/src/git/mappero/lib/MapperoUi/MapperoUi.qbs:49:5 Module
Qt.core could not be loaded.
/home/mardy/src/git/mappero/lib/MapperoUi/MapperoUi.qbs:50:5 Module
Qt.quick could not be loaded.
/home/mardy/src/git/mappero/src/qt/qt.qbs:4:1 Error while handling
product 'mappero':
/usr/local/share/qbs/imports/qbs/base/QtGuiApplication.qbs:32:5 Module
Qt.gui could not be loaded.
/home/mardy/src/git/mappero/src/qt/qt.qbs:125:5 Module Qt.core could not
be loaded.
/home/mardy/src/git/mappero/src/qt/qt.qbs:126:5 Module Qt.quick could
not be loaded.
/home/mardy/src/git/mappero/src/qt/qt.qbs:128:5 Module Qt.widgets could
not be loaded.
/home/mardy/src/git/mappero/src/qt/qt.qbs:135:5 Module Qt.concurrent
could not be loaded.
================

These modules seem, however, to have been proeprly setup. I do have, for
example:

  default/genmodules/Qt/c0b33115f511456a/modules/Qt/core/core.qbs


Any hints on how to further debug the issue?

Ciao,
  Alberto

-- 
http://www.mardy.it - Geek in un lingua international


More information about the Qbs mailing list