I downloaded a Qt project but when I want to compile it, it gives the following error on "release" mode:
moc_mainwindow.cpp:-1: error: undefined reference to 'MainWindow::on_pushButton_2_clicked()' moc_adminpage.cpp:-1: error: undefined reference to 'AdminPage::on_pushButton_clicked()'
And doesn't compile at all
On "debug" mode however it does compile and the exe runs BUT then it gives the following warning:
QMetaObject::connectSlotsByName: No matching signal for on_pushButton_clicked() QMetaObject::connectSlotsByName: No matching signal for on_lineEdit_editingFinished()
And the noted "pushButton" does not do anything when it's clicked!
So I know a little about moc files, but I have never had to actually do anything with them. I'm guessing there is something wrong with them though. It looks like Qt cannot connect my on_pushButton_clicked()
function (slot) to pushButton clicked signal.
PS 1: The errors noted in the "release" part take place in the moc files.
PS 2: In each of my moc files on the first line there is an #include "../../FinalProject/mainwindow.h
which causes the following warning
no such file o directory
This probably must be it, but how can I fix it ?