Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt5: Unknown module(s) in QT: serialport
Forum Updated to NodeBB v4.3 + New Features

Qt5: Unknown module(s) in QT: serialport

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 28.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wspilot
    wrote on last edited by
    #1

    Hi,
    Qt5/Qt Creator 2.6.1/linux64/ubuntu 12.10/:
    I installed QtSerialPort.
    QT += serialport in .pro
    Runing the terminal example I get:
    @17:49:40: Running steps for project terminal...
    17:49:40: Starting: "/home/wim/Qt5.0.0/5.0.0/gcc_64/bin/qmake" /home/wim/qt/terminal/terminal.pro -r -spec linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
    Project ERROR: Unknown module(s) in QT: serialport
    17:49:40: The process "/home/wim/Qt5.0.0/5.0.0/gcc_64/bin/qmake" exited with code 3.
    Error while building/deploying project terminal (kit: Desktop Qt 5.0.0 GCC 64bit (SDK))
    When executing step 'qmake'@

    Qt version for desktop:

    @Name:
    Qt 5.0.0 GCC 64bit (SDK)
    ABI:
    x86-linux-generic-elf-64bit
    Source:
    /home/wim/Qt5.0.0/5.0.0/gcc_64
    mkspec:
    linux-g++-64
    qmake:
    /home/wim/Qt5.0.0/5.0.0/gcc_64/bin/qmake
    Version:
    5.0.0
    QMAKE_SPEC
    linux-g++-64
    QMAKE_VERSION
    3.0
    QMAKE_XSPEC
    linux-g++-64
    QT_HOST_BINS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/bin
    QT_HOST_DATA
    /home/wim/Qt5.0.0/5.0.0/gcc_64
    QT_HOST_PREFIX
    /home/wim/Qt5.0.0/5.0.0/gcc_64
    QT_INSTALL_ARCHDATA
    /home/wim/Qt5.0.0/5.0.0/gcc_64
    QT_INSTALL_BINS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/bin
    QT_INSTALL_CONFIGURATION
    /etc/xdg
    QT_INSTALL_DATA
    /home/wim/Qt5.0.0/5.0.0/gcc_64/
    QT_INSTALL_DEMOS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/examples
    QT_INSTALL_DOCS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/doc
    QT_INSTALL_EXAMPLES
    /home/wim/Qt5.0.0/5.0.0/gcc_64/examples
    QT_INSTALL_HEADERS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/include
    QT_INSTALL_IMPORTS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/imports
    QT_INSTALL_LIBEXECS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/libexec
    QT_INSTALL_LIBS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/lib
    QT_INSTALL_PLUGINS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/plugins
    QT_INSTALL_PREFIX
    /home/wim/Qt5.0.0/5.0.0/gcc_64
    QT_INSTALL_QML
    /home/wim/Qt5.0.0/5.0.0/gcc_64/qml
    QT_INSTALL_TESTS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/tests
    QT_INSTALL_TRANSLATIONS
    /home/wim/Qt5.0.0/5.0.0/gcc_64/translations
    QT_SYSROOT

    QT_VERSION
    5.0.0
    @

    So, qmake looks for libs and header files locally (/home/wim/Qt5.0.0/5.0.0/gcc_64). So I copied the serial libs and headers to this local directory as well.
    Still the serial module cannot be found...

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wspilot
      wrote on last edited by
      #2

      Well, answering myself...
      After some experimenting I found out that I had to copy the include, libs and mkspecs directories from the qtserialport build directory into the current project directory.
      (BTW: check the permissions of the ttyXXX you like to connect to).

      1 Reply Last reply
      0
      • 日 Offline
        日 Offline
        日月重光
        wrote on last edited by
        #3

        我也遇上来 纠结来半天才发现是在原来有2个qmake 貌似编译qtserialport时用那个qt5.0.0里面的qmake就正常了
        /home/han/Qt5.0.0/5.0.0/gcc/bin/qmake -spec /home/han/Qt5.0.0/5.0.0/gcc/mkspecs/linux-g++-32 ../qtserialport/qtserialport.pro

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dvolosnykh
          wrote on last edited by
          #4

          wspilot, you saved my time.
          Had the same issues with Qt3D. The point about copying mkspecs also was critical.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved