Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTSerialPort Problem
Qt 6.12 LTS is out! See what's new in the release blog

QTSerialPort Problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Dear all:
    I'm new user on QT. Now I want to use function of class that name "QSerialPort", i can include the .h file and Qt Creator also recognize them, but when i compiled, I got faults. The content of fault is following:

    "LINK2019: unresolved external symbol "__declspec(dllimport)public: virtual _thiscall QSP::~QSerialPort(void)" (_imp??1QSerialPort@@UAE@XZ referenced in function _main"

    It seems is QT can't find the definition of function in "QSerialPort", my computer is 64-bit and compiler is "Microsoft Visual C++ Compiler 10.0(x86)", Qt version is "Qt 5.1.0(msvc2010) in my configuration, the QT I downloaded is 32-bit. Anyone has same problem ?? Or can someone give me some suggestions??
    Thanks.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      t3685
      wrote on last edited by
      #2

      You need to tell Qt that you want to use the QSerialPort module. You can do this by adding the line

      QT += serialport

      to your .pro file.

      http://qt-project.org/doc/qt-5.1/qtserialport/qtserialport-index.html

      Good luck!

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        I resolved from your suggestions. Thank you :))

        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
        • Unsolved