Solved Build fails as ui_mainwindow.h not found
-
Hi all,
I am new to QT and working on 5.6.
- I am not able to buikd my code as ui_mainwindow.h not found error is coming.
Please help
- I am not able to buikd my code as ui_mainwindow.h not found error is coming.
-
@Tanuja Can you show your pro file?
-
@Tanuja Can you clean your build and run qmake?
-
@jsulm
QT. += core GUIgreater than(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = test
TEMPLATE = appSOURCES += main.cpp
main window.cppHEADERS += main window.h
FORMS += main window.ui
-
@Tanuja said in Build fails as ui_mainwindow.h not found:
main window.cpp
HEADERS += main window.h
FORMS += main window.uiAre those file names correct? You have spaces in them?
-
@artwaw
Yes it's correct
There are no spaces in the file -
@Tanuja In the .pro file your file names have spaces. Please make sure that they reflect real file names.
-
-
Apart from previous posts, looks like you changed the UI file name.
FORMS += main window.uiI'm seeing blank space between main and window.ui. Is it mainwindow.ui or window.ui ? If it is window.ui,it must be generating ui_window.h file. Please check that. So you must include the ui_windows.h instead of ui_mainwindow.h
-
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4) : QT += widgets
TARGET = test
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui
This is my profile file
-
@dheerendra
I have posted my pro file again.please have a look. -
This looks ok. Do you have the problem still ? Can you create a new project with all default settings in your QtCreator & check everything works ?
-
@dheerendra
Yes I created a new project but the problem is still coming. Also there was Qt5cored.dll file which was missing. I added that also.
Is this problem because of that? -
Ok. I suspect that issue with your installation. One last check b4 u get into further. I'm assuiming that you are working on windows system. Do you see uic.exe executable in bin directory of your installation ?
-
@dheerendra
Yes it is there -
@Tanuja How did you install Qt?
-
@jsulm
Downloaded the software and installed it.
It was working correctly when I installed it. After some time it started giving me this error.
As far as I know, there is some issue with my Qt5core.dll file -
@Tanuja What is the issue with Qt5core.dll?
You could try to install the latest Qt version (5.9.1). -
@jsulm
Ok will do that -
as @jsulm already suggested, you better install the new version and try. My suspect is that you have installed some other software which has old Qt library in path. This must be causing the issue.