How to Get Static Qt Build with any extra module. Eg: error: Unknown module(s) in QT: += serialport

1.2k views Asked by At

trying to use serialport with a static build of qt and keep getting this error when running qmake or build.

error: Unknown module(s) in QT: += serialport

Using:

  • QT creator 5.5.1
  • Windows 7
  • Commercial Licence

  • QT Static build 5.13.0

  • Got a barebones test project with completely standard .pro file.

Things Attempted:

  • Adding QT: += serialport in pro file
  • Building Qt5SerialPort on its own
  • Adding INCLUDEPATH with path to the built Qt5SerialPort
  • Adding built Qt5SerialPort Libs to pro file
  • Adding built Qt5SerialPort to static qtbase's include and libs folders and rebuilding static qt with jom
  • Tried other things that have been demonstrated to work on solved questions: https://forum.qt.io/topic/57299/project-error-unknown-module-s-in-qt-serialport/2 ; done this step for step (kinda, i'm not using minGW cos commercial), didn't work

this is what the .pro file looks like:

QT       += core gui \
         serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = testserialport
TEMPLATE = app

DEFINES += QT_DEPRECATED_WARNINGS

CONFIG += c++11

SOURCES += \
        main.cpp \
        mainwindow.cpp

HEADERS += \
        mainwindow.h

FORMS += \
        mainwindow.ui

qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

Expecting to run qmake and be able to use the #include files for serialport and in the future be able to do the same with other modules for static Qt builds.

Cheers

0

There are 0 answers