Windows: C++ does not support default-int
-
wrote on 27 Aug 2018, 09:47 last edited by sonichy
void MainWindow::keyPressEvent(QKeyEvent *event) { qDebug() << event; ui->statusBar->showMessage(event->text()); if (event->key() == Qt::Key_Escape) { ui->pushButton_Esc->setChecked(true); } .... }
Linux has no error.
Windows error:
moc_mainwindow.cppQT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr} };
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
void MainWindow::keyPressEvent(QKeyEvent *event) { qDebug() << event; ui->statusBar->showMessage(event->text()); if (event->key() == Qt::Key_Escape) { ui->pushButton_Esc->setChecked(true); } .... }
Linux has no error.
Windows error:
moc_mainwindow.cppQT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr} };
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
wrote on 27 Aug 2018, 09:57 last edited by@sonichy
In which line is the error raised?
Typically, some symbol has only been forward-declared, but the corresponding header file has not been included. -
void MainWindow::keyPressEvent(QKeyEvent *event) { qDebug() << event; ui->statusBar->showMessage(event->text()); if (event->key() == Qt::Key_Escape) { ui->pushButton_Esc->setChecked(true); } .... }
Linux has no error.
Windows error:
moc_mainwindow.cppQT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr} };
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
wrote on 27 Aug 2018, 09:58 last edited byYou should indicate for which line the error is output.
I would assume that it is
qDebug() << event;
You are simply trying to output an address there. That is probably open to debate if you want to treat as error or not.
If you are really interested in the address only, than cast it as an integer.
1/3