As the title says, I am having an issue with Qt Creator. I started to play with it and created a main() with a some code in it and when I wanted to compile it to see how it would appear on the screen, I am unable to do so, I see the following error:
Cannot find file:
/Users/Eugene/Documents/Qt/Test/test.pro. Le processus
«/Users/Eugene/QtSDK/Desktop/Qt/473/gcc/bin/qmake» terminated with
error cade 2. Error during the compilation of the project Test (build : Desktop)
during the step ‘qmake’
Yet when I go to the folder, I can see the test.pro file there, so I don’t see why Qt is unhappy.
Did anybody have had a similar problem? I couldn’t find any similar question so far.
Thanks in advance for you help,
Regards
Chris
17k5 gold badges56 silver badges60 bronze badges
asked Aug 29, 2011 at 20:12
0
Are you sure that you don’t have space or other ‘weird’ characters in your project’s path? If so, Qt is unhappy.
You may also try to delete the *.pro.user
file and try to compile again.
If unfortunately neither of them work, you can try to compile your project on the command line.
cd
to the root directory of your project and:
qmake -project
mingw32-make
If this still can’t get your project compiled, you should check your Qt installation.
Mat
201k40 gold badges392 silver badges405 bronze badges
answered Dec 7, 2011 at 13:11
user957121user957121
2,9464 gold badges24 silver badges36 bronze badges
In my case removing non-ascii characters from the path solved the problem. Spaces are fine, at least from my experience.
answered Apr 14, 2015 at 14:47
I found another solution that worked for me.
QT is cross-platform tool, so it needs some limitations and restrictions.
One of this restriction is correct path to project. It CAN’T contain any spaces!!!
For example
D:Qt projectproject — wrong
is WRONG. (notice space between Qt and Project).
Instead use something like this
D:Qt_projectproject — correct
answered Nov 8, 2014 at 11:01
1
ЧакЭ одобряЭ 285 / 284 / 86 Регистрация: 27.12.2009 Сообщений: 1,767 |
|
1 |
|
07.12.2011, 19:08. Показов 13811. Ответов 4
Cannot find file: c:UsersЧакuntitled4untitled4.pro. ТО же с любым другим проектом
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
07.12.2011, 19:08 |
Ответы с готовыми решениями: Файл: Написать программу, которая создает файл содержащий целые числа, и находит наименьшее из чисел, содержащийся в файле. если находит совподение, то создает текстовый файл — название которого искомый номер, а в сам txt файл встовляет 2 столбец есть excel файл. в нем в первом… Не находит файл procedure TForm1.FormCreate(Sender: TObject); Не находит файл Помогите 4 |
Почетный модератор 11308 / 4282 / 439 Регистрация: 12.06.2008 Сообщений: 12,340 |
|
07.12.2011, 20:16 |
2 |
Qt не любит, когда в имени пути присутствуют русские буквы.
2 |
2732 / 1428 / 89 Регистрация: 08.09.2011 Сообщений: 3,746 Записей в блоге: 1 |
|
07.12.2011, 20:30 |
3 |
Qt не любит, когда в имени пути присутствуют русские буквы. Не по теме: походу Qt вообще не любит русские буквы
0 |
Humanoid |
07.12.2011, 20:32
|
Не по теме: Чистый, я в своих приложениях во всю использую… главное кодек настроить вначале. Но QtCreator иногда подвисает очень смачно при переключении раскладки клавиатуры.
1 |
2732 / 1428 / 89 Регистрация: 08.09.2011 Сообщений: 3,746 Записей в блоге: 1 |
|
07.12.2011, 21:24 |
5 |
Не по теме: Чистый, я в своих приложениях во всю использую… главное кодек настроить вначале. Но QtCreator иногда подвисает очень смачно при переключении раскладки клавиатуры. Не по теме: да я тоже
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
07.12.2011, 21:24 |
Помогаю со студенческими работами здесь Не находит файл не находит файл
Не находит файл! Сразу к делу: Искать еще темы с ответами Или воспользуйтесь поиском по форуму: 5 |
Доброго времени суток.
Только поставил QT 5.6 и сразу словил ошибку.
Код:
#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
QApplication app (argc, argv);
QPushButton button («Hello world !»);
button.show();
return app.exec();
}
Текст консоли сборки:
22:59:51: Выполняются этапы для проекта Hello…
22:59:51: Запускается: «C:Qt5.6mingw49_32binqmake.exe» F:С++LearnQTHelloHello.pro -r -spec win32-g++ «CONFIG+=debug» «CONFIG+=qml_debug»
Cannot find file: F:С++LearnQTHelloHello.pro.
22:59:51: Процесс «C:Qt5.6mingw49_32binqmake.exe» завершился с кодом 2.
Ошибка при сборке/установке проекта Hello (комплект: Desktop Qt 5.6.0 MinGW 32bit)
Во время выполнения этапа «qmake»
22:59:51: Прошло времени: 00:00.
Подскажите, в чем может быть проблема?
Что делать, если QT Creator под windows не находит файл проекта (.pro) и в лог постройки пишет следующее:
17:57:56: Running steps for project first...
17:57:56: Starting: "C:Qt4.8.4binqmake.exe" "D:мои документыQTfirstfirst.pro" -r -spec win32-g++ "CONFIG+=declarative_debug"
Cannot find file: d:мои документыQTfirstfirst.pro.
17:57:56: The process "C:Qt4.8.4binqmake.exe" exited with code 2.
Error while building/deploying project first (target: Desktop)
When executing step 'qmake'
Following is the output of the error —
18:29:31: Running steps for project BCSEIII…
18:29:31: Configuration unchanged, skipping qmake step.
18:29:31: Starting: «C:QtToolsmingw810_64binmingw32-make.exe» -j8
C:/Qt/6.1.3/mingw81_64/bin/qmake.exe -o Makefile «../templateProgram.rar (Unzipped Files)/BCSEIII.pro» -spec win32-g++ CONFIG+=debug CONFIG+=qml_debug
Cannot find file: ..templateProgram.rar.
Cannot find file: (Unzipped.
Cannot find file: Files)BCSEIII.pro.
mingw32-make: *** [Makefile:204: Makefile] Error 2
18:29:32: The process «C:QtToolsmingw810_64binmingw32-make.exe» exited with code 2.
Error while building/deploying project BCSEIII (kit: Desktop Qt 6.1.3 MinGW 64-bit)
When executing step «Make»
18:29:32: Elapsed time: 00:01.
Here is the code of .pro file —
#————————————————-
Project created by QtCreator 2018-07-19T19:54:40
#————————————————-
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = BCSEIII
TEMPLATE = app
The following define makes your compiler emit warnings if you use
any feature of Qt which has been marked as deprecated (the exact warnings
depend on your compiler). Please consult the documentation of the
deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
You can also make your code fail to compile if you use deprecated APIs.
In order to do so, uncomment the following line.
You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES +=
main.cpp
mainwindow.cpp
my_label.cpp
HEADERS +=
mainwindow.h
my_label.h
FORMS +=
mainwindow.ui
I am using qt 6 in windows 10.
How can i fix the error?