[Resolved] Qextserialport, can't compile and Windows.



  • Well I trying to build the folder the lib on the folder "/buildlib" but I get some errors:

    @
    16:50:23: Running build steps for project buildlib...
    16:50:23: Configuration unchanged, skipping qmake step.
    16:50:23: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug all
    mingw32-make.exe[1]: Entering directory C:/Users/dvl/Documents/qextserialport-1.2beta2/buildlib-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug' g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQEXTSERIALPORT_BUILD_SHARED -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include" -I"..\src" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\ActiveQt" -I"debug" -I"..\buildlib" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\mkspecs\win32-g++" -o debug\qextserialport_win.o ..\src\qextserialport_win.cpp In file included from ..\src\qextserialport_win.cpp:44: c:\QtSDK\Desktop\Qt\4.8.0\mingw\include/QtCore/private/qwineventnotifier_p.h:1:61: error: ../../../src/corelib/kernel/qwineventnotifier_p.h: No such file or directory ..\src\qextserialport_win.cpp: In member function 'bool QextSerialPortPrivate::open_sys(QFlags<QIODevice::OpenModeFlag>)': ..\src\qextserialport_win.cpp:117: error: invalid use of incomplete type 'struct QWinEventNotifier' ..\src\/qextserialport_p.h:174: error: forward declaration of 'struct QWinEventNotifier' ..\src\qextserialport_win.cpp:119: error: no matching function for call to 'QextSerialPort::connect(QWinEventNotifier*&, const char*, QextSerialPort* const&, const char*, Qt::ConnectionType)' c:\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) c:\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) c:\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:134: error: invalid use of incomplete type 'struct QWinEventNotifier' ..\src\/qextserialport_p.h:174: error: forward declaration of 'struct QWinEventNotifier' ..\src\qextserialport_win.cpp:135: error: invalid use of incomplete type 'struct QWinEventNotifier' ..\src\/qextserialport_p.h:174: error: forward declaration of 'struct QWinEventNotifier' mingw32-make.exe[1]: Leaving directoryC:/Users/dvl/Documents/qextserialport-1.2beta2/buildlib-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug'
    mingw32-make.exe[1]: *** [debug/qextserialport_win.o] Error 1
    mingw32-make.exe: *** [debug-all] Error 2
    16:50:25: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project buildlib (target: Desktop)
    When executing build step 'Make'
    @

    I can't find to "/src/corelib/"... Anyone is using the QExtSerialPort on Windows and Linux?
    For linux is working everthing fine.

    http://code.google.com/p/qextserialport/



  • Hi, I notice that the message you provided says:

    @
    In file included from ..\src\qextserialport_win.cpp:44:
    c:\QtSDK\Desktop\Qt\4.8.0\mingw\include/QtCore/private/qwineventnotifier_p.h:1:61: error: ../../../src/corelib/kernel/qwineventnotifier_p.h: No such file or directory
    @

    And if I'm right, this should be a bug of QtSDK. The contents of
    @
    c:\QtSDK\Desktop\Qt\4.8.0\mingw\include/QtCore/private/qwineventnotifier_p.h
    @
    is wrong!


    IMO, there are several workarounds can be used.

    1. If Qt's source code can be found in your hardware, fix the contents of this broken file. For example, change to

    #include "c:\QtSDK\QtSources\4.8.0/src/corelib/kernel/qwineventnotifier_p.h"

    or you can simply replace the file "include/QtCore/private/qwineventnotifier_p.h" with "src/corelib/kernel/qwineventnotifier_p.h"

    1. If Qt's source code does not exist in your hardware, you can download this file from http://qt.gitorious.org/qt/qt/blobs/4.8/src/corelib/kernel/qwineventnotifier_p.h

    then put it to $QTDIR/include/QtCore/private/qwineventnotifier_p.h

    1. Remove the broken file

    $QTDIR/include/QtCore/private/qwineventnotifier_p.h

    then QextSerialPort will auto select qextwineventnotifier_p.h



  • Change the errors:

    @
    ...
    ...
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQESP_NO_QT4_PRIVATE -DQEXTSERIALPORT_BUILD_SHARED -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include" -I"..\src" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\ActiveQt" -I"debug" -I"..\buildlib" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\mkspecs\win32-g++" -o debug\moc_qextserialport.o debug\moc_qextserialport.cpp
    debug\moc_qextserialport.cpp: In static member function 'static void QextSerialPort::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
    debug\moc_qextserialport.cpp:99: error: invalid use of incomplete type 'struct QextSerialPortPrivate'
    debug/../../src/qextserialport.h:167: error: forward declaration of 'struct QextSerialPortPrivate'
    debug\moc_qextserialport.cpp:99: error: expected type-specifier before 'HANDLE'
    debug\moc_qextserialport.cpp:99: error: expected '>' before 'HANDLE'
    debug\moc_qextserialport.cpp:99: error: expected '(' before 'HANDLE'
    debug\moc_qextserialport.cpp:99: error: expected primary-expression before ')' token
    debug\moc_qextserialport.cpp:99: error: 'HANDLE' was not declared in this scope
    debug\moc_qextserialport.cpp:100: error: invalid use of incomplete type 'struct QextSerialPortPrivate'
    debug/../../src/qextserialport.h:167: error: forward declaration of 'struct QextSerialPortPrivate'
    mingw32-make.exe[1]: Leaving directory `C:/Users/dvl/Documents/qextserialport-1.2beta2/buildlib-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug'
    mingw32-make.exe[1]: *** [debug/moc_qextserialport.o] Error 1
    mingw32-make.exe: *** [debug-all] Error 2
    11:21:54: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project buildlib (target: Desktop)
    When executing build step 'Make'
    @



  • Hi dcbasso,

    It looks rather strange. In fact, moc_qextserialport.cpp is not a compile unit, which can be thought as a header file, so it should not be compiled independently.

    If you have read the source code of qextserialport.cpp, you can found following line
    @
    #include "moc_qextserialport.cpp"
    @

    So the problem is, why the compiler want to compile it :-)



  • I resolve this problem...
    Know I have this problem:

    :-1: error: cannot find -lqextserialport-1.2d

    Just on Windows!!!



  • Resolved!


  • Moderators

    bq. Resolved!

    You might make a note of what the resolution was, in case someone else reads the thread in the future and has the same problem.



  • Solution: Compile the project on folder: "qextserialport/buildlib".



  • Someone help!!! I got same problem

    Upon compiling i got the FF error

    @01:31:08: Running build steps for project DBMS...
    01:31:08: Configuration unchanged, skipping qmake step.
    01:31:08: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Release
    mingw32-make.exe[1]: Entering directory C:/Users/ACER/Desktop/ISKUL/STI/71' g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DNCREPORT_IMPORT -DQT_DLL -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtNetwork" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtXml" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtSql" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include" -I"c:\QtSDK\qextserialport-1.2rc\src" -I"c:\Program Files\NCReport\2.11.0.MinGW.Qt4.8.5.eval\include" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\ActiveQt" -I"release" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\mkspecs\win32-g++" -o release\qextserialport_win.o c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp:43:50: error: QtCore/private/qwineventnotifier_p.h: No such file or directory c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp: In member function 'bool QextSerialPortPrivate::open_sys(QFlags<QIODevice::OpenModeFlag>)': c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp:111: error: invalid use of incomplete type 'struct QWinEventNotifier' c:\QtSDK\qextserialport-1.2rc\src\/qextserialport_p.h:173: error: forward declaration of 'struct QWinEventNotifier' c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp:113: error: no matching function for call to 'QextSerialPort::connect(QWinEventNotifier*&, const char [19], QextSerialPort* const&, const char [23], Qt::ConnectionType)' c:\QtSDK\Desktop\Qt\4.8.1\mingw\include/QtCore/qobject.h:204: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType) c:\QtSDK\Desktop\Qt\4.8.1\mingw\include/QtCore/qobject.h:217: note: static bool QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType) c:\QtSDK\Desktop\Qt\4.8.1\mingw\include/QtCore/qobject.h:337: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp: In member function 'bool QextSerialPortPrivate::close_sys()': c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp:128: error: invalid use of incomplete type 'struct QWinEventNotifier' c:\QtSDK\qextserialport-1.2rc\src\/qextserialport_p.h:173: error: forward declaration of 'struct QWinEventNotifier' c:\QtSDK\qextserialport-1.2rc\src\qextserialport_win.cpp:129: error: invalid use of incomplete type 'struct QWinEventNotifier' c:\QtSDK\qextserialport-1.2rc\src\/qextserialport_p.h:173: error: forward declaration of 'struct QWinEventNotifier' mingw32-make.exe[1]: Leaving directoryC:/Users/ACER/Desktop/ISKUL/STI/71'
    mingw32-make.exe[1]: *** [release/qextserialport_win.o] Error 1
    mingw32-make.exe: *** [release] Error 2
    01:31:13: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project DBMS (target: Desktop)
    When executing build step 'Make'@


Log in to reply
 

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