Solved Build fails as ui_mainwindow.h not found
-
-
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.
-
@dheerendra
I will try to install the new version and check. -
It's done
I installed it again and now its building perfectly -
Hi ,
Just yesterday I installed QT 6.3.2. When I started new project in Qt creator, .pro or make file is not generated ...And also getting ui_mainwindow.h not found.Please suggest on how to create .pro file.
Thank you. -
@ru10 Qt6 uses CMake instead of QMake (thoufh you still can use QMake), so look for CMakeLists.txt file.
"And also getting ui_mainwindow.h not found" - this file is generated when you build your project, you should not edit it as your changes will disappear next time this file is generated. -
@jsulm Thank you.
Yes i do have CmakeLists.txt file.
"How to fix ui_mainwindow.h file not found"?
-
@ru10 said in Build fails as ui_mainwindow.h not found:
"How to fix ui_mainwindow.h file not found"?
@jsulm said in Build fails as ui_mainwindow.h not found:
"And also getting ui_mainwindow.h not found" - this file is generated when you build your project
Have you tried building your project? You will get these messages until you do.....