Results 1 to 3 of 3

Thread: qextserialport help

  1. #1
    Join Date
    Jun 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default qextserialport help

    I'm trying to compile qextserialport example called uartassistant. I have downloaded and unpacked qextserialport-1.2beta1.tar.gz. Then I have opened uartassistant example with Qt Creator and try to compile it, but I got this:

    ../../src/qextserialport_win.cpp: In member function 'bool QextSerialPortPrivate:pen_sys(QFlags<*QIODevice::OpenModeFlag>)':
    ../../src/qextserialport_win.cpp:115: error: invalid use of incomplete type 'struct QWinEventNotifier'
    ../../src/qextserialport_p.h:159: error: forward declaration of 'struct QWinEventNotifier'
    ../../src/qextserialport_win.cpp:117: error: no matching function for call to 'QextSerialPort::connect(QWinEventNotifier*&, const char*, QextSerialPort* const&, const char*, Qt::ConnectionType)'
    ../../../QtSDK/Desktop/Qt/4.8.0/mingw/include/*QtCore/qobject.h:204: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
    ../../../QtSDK/Desktop/Qt/4.8.0/mingw/include/*QtCore/qobject.h:217: note: static bool QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType)
    ../../../QtSDK/Desktop/Qt/4.8.0/mingw/include/*QtCore/qobject.h:337: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
    ../../src/qextserialport_win.cpp: In member function 'bool QextSerialPortPrivate::close_sys()':
    ../../src/qextserialport_win.cpp:132: error: invalid use of incomplete type 'struct QWinEventNotifier'
    ../../src/qextserialport_p.h:159: error: forward declaration of 'struct QWinEventNotifier'
    ../../src/qextserialport_win.cpp:133: error: invalid use of incomplete type 'struct QWinEventNotifier'
    ../../src/qextserialport_p.h:159: error: forward declaration of 'struct QWinEventNotifier'
    mingw32-make.exe[1]: *** [debug/qextserialport_win.o] Error 1
    mingw32-make.exe: *** [debug] Error 2
    15:31:42: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project uartassistant (target: Desktop)
    When executing build step 'Make'

    What is wrong? Should I have to do something before I try to compile example? My OS is Windows 7 64bit.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: qextserialport help

    The example is presumably relying on the QExtSerialPort header files being in the default include search path , and they are not. Use the INCLUDEPATH and LIBS variables in the PRO file to add the QExtSerialPort headers and libraries to the relevant paths.

  3. #3
    Join Date
    Jul 2012
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qextserialport help

    go the file that you extracted, copy the folder to the folder containing your project, then in the .pro of your project add this include(../thenameofyourqextserialfolder/src/qextserialport.pri)
    you will notice that the whole folder now is opened in your project.
    #include "mysecondthread.h" in your class header and you will have alright with you.
    consider starting example of your own it is the best starting point.

Similar Threads

  1. Using qextserialport
    By udaybhaskar in forum Newbie
    Replies: 1
    Last Post: 6th April 2011, 14:46
  2. Qextserialport
    By Max123 in forum Qt Programming
    Replies: 3
    Last Post: 27th March 2010, 22:53
  3. New Qextserialport
    By pherthyl in forum Qt Programming
    Replies: 0
    Last Post: 20th August 2009, 01:09
  4. QextSerialPort
    By Diph in forum Newbie
    Replies: 5
    Last Post: 13th September 2008, 19:18
  5. QExtSerialPort
    By baray98 in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2008, 20:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.