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



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



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



  • [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.. :)



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.