PDA

View Full Version : Issue with Qexterialport



MM5
16th July 2015, 08:37
Hi,
I've tried to compile an older project with the latest version of qextserialport (1.2 rc).
I was able to build the dll and I've got the lib file.
I've added the lib to my project file and included serialport.h to my project.
every thing works so far but finally by compiling the project I get following:



debug\moc_qextserialport.cpp: In static member function 'static void QextSerialPort::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
debug\moc_qextserialport.cpp:158:32: error: 'class QextSerialPortPrivate' has no member named '_q_onWinEvent'
case 13: _t->d_func()->_q_onWinEvent((*reinterpret_cast< HANDLE(*)>(_a[1]))); break;
^
debug\moc_qextserialport.cpp:158:66: error: expected type-specifier before 'HANDLE'
case 13: _t->d_func()->_q_onWinEvent((*reinterpret_cast< HANDLE(*)>(_a[1]))); break; ^




I've checked the qextserialport.h, the declaration of the class member is there, but somehow not found in the moc_



Part out of class declaration:

void setDtr(bool set=true);
void setRts(bool set=true);

Q_SIGNALS:
void dsrChanged(bool status);

protected:
qint64 readData(char *data, qint64 maxSize);
qint64 writeData(const char *data, qint64 maxSize);

private:
Q_DISABLE_COPY(QextSerialPort)

#ifdef Q_OS_WIN
Q_PRIVATE_SLOT(d_func(), void _q_onWinEvent(HANDLE))
#endif
Q_PRIVATE_SLOT(d_func(), void _q_canRead())

QextSerialPortPrivate *const d_ptr;
};

#endifIs here something missong? anybody an idea?

Thanks!










09:17:46: Führe Schritte für Projekt DCP_Mon_Anwendung_QT5 aus...
09:17:46: Starte "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" clean
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug clean
mingw32-make[1]: Entering directory 'C:/Users/DESC0213/Dropbox/Projekte/QT_Projekte/DCP_GATEWAY_MONITOR/dcp_monitor_Qextserialport_qt5/build-DCP_Mon_Anwendung_QT5-Desktop_Qt_5_4_2_MinGW_32bit2-Debug'
del debug\moc_confdialog.cpp debug\moc_mainwindow.cpp debug\moc_mthread.cpp debug\moc_qextserialenumerator.cpp debug\moc_qextserialport.cpp
del ui_confdialog.h ui_mainwindow.h
mingw32-make[1]: Leaving directory 'C:/Users/DESC0213/Dropbox/Projekte/QT_Projekte/DCP_GATEWAY_MONITOR/dcp_monitor_Qextserialport_qt5/build-DCP_Mon_Anwendung_QT5-Desktop_Qt_5_4_2_MinGW_32bit2-Debug'
09:17:46: Der Prozess "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" wurde normal beendet.
09:17:46: Unveränderte Konfiguration, qmake-Schritt wird übersprungen.
09:17:46: Starte "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe"
C:/Qt/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/DESC0213/Dropbox/Projekte/QT_Projekte/DCP_GATEWAY_MONITOR/dcp_monitor_Qextserialport_qt5/build-DCP_Mon_Anwendung_QT5-Desktop_Qt_5_4_2_MinGW_32bit2-Debug'
C:\Qt\5.4\mingw491_32\bin\uic.exe ..\src\confdialog.ui -o ui_confdialog.h
C:\Qt\5.4\mingw491_32\bin\uic.exe ..\src\mainwindow.ui -o ui_mainwindow.h
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -D_TTY_WIN_ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\DCP_Mon_Anwendung_QT5" -I"." -I"..\src\qextserialport-1.2rc\src" -I"C:\Qt\5.4\mingw491_32\include" -I"C:\Qt\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"." -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++" -o debug\logfile.o ..\src\logfile.cpp
..\src\logfile.cpp: In constructor 'LogFile::LogFile()':
..\src\logfile.cpp:11:31: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
if(sw.rename(pathbak));
^
..\src\logfile.cpp:15:20: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
if(sw.exists());
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -D_TTY_WIN_ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\DCP_Mon_Anwendung_QT5" -I"." -I"..\src\qextserialport-1.2rc\src" -I"C:\Qt\5.4\mingw491_32\include" -I"C:\Qt\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"." -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++" -o debug\main.o ..\src\main.cpp
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -D_TTY_WIN_ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\DCP_Mon_Anwendung_QT5" -I"." -I"..\src\qextserialport-1.2rc\src" -I"C:\Qt\5.4\mingw491_32\include" -I"C:\Qt\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"." -I"C:\Qt\5.4\mingw491_32\mkspecs\win32-g++" -o debug\mainwindow.o ..\src\mainwindow.cpp
..\src\mainwindow.cpp:159:42: warning: unused parameter 'event' [-Wunused-parameter]
void MainWindow::closeEvent(QCloseEvent *event)
^
..\src\mainwindow.cpp:234:40: warning: unused parameter 'key' [-Wunused-parameter]
void MainWindow::updatesetting(QString key, QString value)
^
..\src\mainwindow.cpp:234:53: warning: unused parameter 'value' [-Wunused-parameter]
void MainWindow::updatesetting(QString key, QString value)
^
..\src\mainwindow.cpp: In member function 'void MainWindow::transmitMsg()':
..\src\mainwindow.cpp:425:7: warning: variable 'p_buff' set but not used [-Wunused-but-set-variable]
char *p_buff;
^
..\src\mainwindow.cpp: At global scope:
..\src\mainwindow.cpp:987:48: warning: unused parameter 'dat' [-Wunused-parameter]
void MainWindow::update_checkbox(unsigned char dat)
^
g++ -c -pipe -fno-keep-inline-dllexport -g -frtti -Wall -Wextra -fexceptions -mthreads -D_TTY_WIN_ -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I"..\DCP_Mon_Anwendung_QT5" -I"." -I"..\src\qextserialport-1.2rc\src" -I"C:\Qt\5.4\mingw491_32\include" -I"C:\Qt\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt\5.4\mingw491_32\include\QtGui" -I"C:\Qt\5.4\mingw491_32\include\QtCore" -I"debug" -I"." -I"C:\Qt\5.4\mingw491_32\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:158:32: error: 'class QextSerialPortPrivate' has no member named '_q_onWinEvent'
case 13: _t->d_func()->_q_onWinEvent((*reinterpret_cast< HANDLE(*)>(_a[1]))); break;
^
debug\moc_qextserialport.cpp:158:66: error: expected type-specifier before 'HANDLE'
case 13: _t->d_func()->_q_onWinEvent((*reinterpret_cast< HANDLE(*)>(_a[1]))); break;
^
debug\moc_qextserialport.cpp:158:66: error: expected '>' before 'HANDLE'
debug\moc_qextserialport.cpp:158:66: error: expected '(' before 'HANDLE'
debug\moc_qextserialport.cpp:158:74: error: expected primary-expression before ')' token
case 13: _t->d_func()->_q_onWinEvent((*reinterpret_cast< HANDLE(*)>(_a[1]))); break;
^
debug\moc_qextserialport.cpp:158:74: error: 'HANDLE' was not declared in this scope
debug\moc_qextserialport.cpp:158:74: note: suggested alternative:
In file included from C:\Qt\5.4\mingw491_32\include/QtCore/qobjectdefs.h:41:0,
from C:\Qt\5.4\mingw491_32\include/QtCore/qobject.h:40,
from C:\Qt\5.4\mingw491_32\include/QtCore/qiodevice.h:39,
from C:\Qt\5.4\mingw491_32\include/QtCore/QIODevice:1,
from debug\../../src/qextserialport-1.2rc/src/qextserialport.h:35,
from debug\moc_qextserialport.cpp:9:
C:\Qt\5.4\mingw491_32\include/QtCore/qnamespace.h:1490:20: note: 'Qt::HANDLE'
typedef void * HANDLE;
^
debug\moc_qextserialport.cpp:159:32: error: 'class QextSerialPortPrivate' has no member named '_q_canRead'
case 14: _t->d_func()->_q_canRead(); break;
^
Makefile.Debug:2004: recipe for target 'debug/moc_qextserialport.o' failed
mingw32-make[1]: *** [debug/moc_qextserialport.o] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/DESC0213/Dropbox/Projekte/QT_Projekte/DCP_GATEWAY_MONITOR/dcp_monitor_Qextserialport_qt5/build-DCP_Mon_Anwendung_QT5-Desktop_Qt_5_4_2_MinGW_32bit2-Debug'
makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
09:18:04: Der Prozess "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" wurde mit dem Rückgabewert 2 beendet.
Fehler beim Erstellen/Deployment des Projekts DCP_Mon_Anwendung_QT5 (Kit: Desktop Qt 5.4.2 MinGW 32bit2)
Bei der Ausführung von Schritt "Make"
09:18:04: Verstrichene Zeit: 00:18.