Ui::MainWindow is usually defined in the ui_MainWindow.h file that is generated during compilation.
Do you have such a file in the Debug subdirectory of your project directory? What are the file’s contents?
Additionally could you please post the full build output from the Output window here? Please rebuild the project before to ensure the log will be complete.