Important: Please read the Qt Code of Conduct -

Error in building qt code myself

  • Hi,

    I am trying to make an android application which can print through serial port. Since there is no support of serial port for android platform I need to work around. I found this link which seems promising: "Serial port in android":

    This says rebuild the serialport code for my platform: "How to build":
    But it shows error when I rebuild the project.!Libraries\Pictures(Libraries\Pictures\build_error.png)!

    E:\WorkSpaces\Qt\Qt_WidgetApps\AndroidSerialPortTrials\QTCode\qt-qtserialport\src\serialport\qserialport.cpp:45: In file included from E:/WorkSpaces/Qt/Qt_WidgetApps/AndroidSerialPortTrials/QTCode/qt-qtserialport/src/serialport/qserialport.cpp:45:0:

    E:\WorkSpaces\Qt\Qt_WidgetApps\AndroidSerialPortTrials\QTCode\qt-qtserialport\src\serialport\qserialport.h:48: error: QtSerialPort/qserialportglobal.h: No such file or directory
    #include <QtSerialPort/qserialportglobal.h>

    Can anyone tell how to resolve this?

  • Qt Champions 2017

    which version of Qt you are using ? This file qserialportglobal.h may there somewhere and may not be in path. Just check that. I had similar issue sometime back while compiling for desktop.

  • I'm using 5.3 version

    Yes, the problem is there is no QtSerialPort folder itself in android path.
    C:\Qt\Qt5.3.0\5.3\android_armv7\include ==> no QtSerialPort folder

    Is it ok if I copy and paste it from

    I copied and build... Need to verify now :) thanks

Log in to reply