qextserialport crashes prigramm
-
Hi, everybody!
I'm using qextserialport in my win app. It has 4 header and cpp files.3dparty/qextserialport/qextserialenumerator_unix.cpp \ 3dparty/qextserialport/qextserialenumerator_win.cpp \ 3dparty/qextserialport/qextserialport.cpp \ 3dparty/qextserialport/win_qextserialport.cpp 3dparty/qextserialport/qextserialenumerator.h \ 3dparty/qextserialport/qextserialport.h \ 3dparty/qextserialport/qextserialport_global.h \ 3dparty/qextserialport/qwineventnotifier_p.h
When I include this lib to empty Qwidget project. Project doesn't run. It says "The program has unexpectedly finished." When I execute project without this lib, it's ok.
I found out, if I comment out some lines in moc_qwineventnotifier_p.cpp:QT_INIT_METAOBJECT const QMetaObject QWinEventNotifier::staticMetaObject = { { /* &QObject::staticMetaObject, qt_meta_stringdata_QWinEventNotifier.data, qt_meta_data_QWinEventNotifier, qt_static_metacall, nullptr, nullptr */ } };
It would work. But I don't know why. Can someone explain what's going on? Why this lines affect on execution. Some theoretical help pls.
-
qwineventnotifier_p.h
is a private header of Qt Core. Having a copy of it in your app is calling for problems, especially if the version of it doesn't match the exact version that Qt Core is built with.I assume qextserialport needs access to this private header; in this case, make sure that private headers are installed, and try to include the header from Qt.