0

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

Akism90
  • 43
  • 11
  • Can I see your configure command? I built a static Qt library, and I have the serialport. You can look at my configure command here: https://forum.qt.io/topic/102303/issues-building-static-qt/19 – mzimmers Aug 28 '19 at 18:11
  • I've been using ```configure -debug-and-release -static -commercial -opengl desktop -nomake examples -nomake tests```. I'll have a go with the one on the link cheers – Akism90 Aug 29 '19 at 06:06
  • After running jom the build quits with this error: `jom: C:\Q t\5.13.0\Src\qtbase\src\Makefile [sub-qdbusxml2cpp-make_first] Error 2 jom: C:\Qt\5.13.0\Src\qtbase\Makefile [sub-src-make_first] Error 2 jom: C:\Qt\5.13.0\Src\Makefile [module-qtbase-make_first] Error 2 ` – Akism90 Aug 29 '19 at 06:37
  • I don't know what that means. Did you run configure on a fresh source tree? A couple of times, I've failed to untar a fresh copy before configuring, and it can cause really weird errors. – mzimmers Aug 29 '19 at 15:47
  • So along with your configure command and python2.7 (i had 3.7) on the path, it is now working, thanks :) – Akism90 Aug 30 '19 at 06:59

0 Answers0