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. Cannot open include file 'QSerialPort': no such file or directory
Qt 6.11 is out! See what's new in the release blog

Cannot open include file 'QSerialPort': no such file or directory

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.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.
  • F Offline
    F Offline
    frankiefrank
    wrote on last edited by
    #1

    I recently switched from Qt 5.2.0 to Qt 5.3 and then reinstalled 5.2.0.

    Now I have a compilation error on #include <QSerialPort>:
    Cannot open include file 'QSerialPort': no such file or directory

    I only get it for Qt 5.2.0 environment. Building in 5.3.0 works.

    It doesn't complain if I write <QtSerialPort/QSerialPort> but I'm not sure what broke or changed.

    "Roads? Where we're going, we don't need roads."

    1 Reply Last reply
    0
    • F Offline
      F Offline
      frankiefrank
      wrote on last edited by
      #2

      OK, Now I see that in the makefiles I have some references to the stable version of QtSerialPort that I had installed to check something.

      This appears as a part of the INCPATH generated by qmake.
      -I"C:\qtserialport-stable\include" -I"C:\qtserialport-stable\include\QtSerialPort" -I"C:\include" -I"C:\include\QtSerialPort"

      How do I get rid/uninstall the "external" QtSerialPort so that I'm left with only what comes shipped with 5.2.0/5.3.0?

      "Roads? Where we're going, we don't need roads."

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kuzulis
        Qt Champions 2020
        wrote on last edited by
        #3

        [quote]
        How do I get rid/uninstall the “external” QtSerialPort so that I’m left with only what comes shipped with 5.2.0/5.3.0?
        [/quote]

        You can do "make uninstall" for our custom QtSerialPort's. This you should to do from your "shadow" directory in which you was building of QtSerialPort. In case you delete this directory, then you should to do compilation again, and then do "make uninstall".

        Or you can manually to remove all *.dll, includes, and all mention of QtSerialPort from your Qt installation directory (by searching).

        Then you need to re-install QtSerialPort from Qt installer again.. Maybe.. :)

        1 Reply Last reply
        0
        • F Offline
          F Offline
          frankiefrank
          wrote on last edited by
          #4

          Thanks for that.

          Is there a way to build QtSerialPort without "installing" it? I really want it to just be built into a shadow build folder but I don't want it to touch any of the "shipped" Qt parts. Is there anything specific I should modify? And where?

          "Roads? Where we're going, we don't need roads."

          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