Qt creator код ошибки 2

I just downloaded Qt SDK 4.8.1 and, after installing it, I simply tried to compile a default C++ project, but I got this strange error.

16:50:24: Running build steps for project test…
16:50:24: Configuration unchanged, skipping qmake step.
16:50:24: Starting: «C:QtSDKQtCreatorbinjom.exe»
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I»……..QtSDKDesktopQt4.8.1msvc2008includeQtCore» -I»……..QtSDKDesktopQt4.8.1msvc2008includeQtGui» -I»……..QtSDKDesktopQt4.8.1msvc2008include» -I»……..QtSDKDesktopQt4.8.1msvc2008includeActiveQt» -I»debug» -I».» -I»..test» -I».» -I»……..QtSDKDesktopQt4.8.1msvc2008mkspecswin32-msvc2008″ -Fodebug @C:DOCUME~1dfuserIMPOST~1Tempmain.obj.1464.0.jom
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I»……..QtSDKDesktopQt4.8.1msvc2008includeQtCore» -I»……..QtSDKDesktopQt4.8.1msvc2008includeQtGui» -I»……..QtSDKDesktopQt4.8.1msvc2008include» -I»……..QtSDKDesktopQt4.8.1msvc2008includeActiveQt» -I»debug» -I».» -I»..test» -I».» -I»……..QtSDKDesktopQt4.8.1msvc2008mkspecswin32-msvc2008″ -Fodebug @C:DOCUME~1dfuserIMPOST~1Tempmainwindow.obj.1464.0.jom
C:QtSDKQtCreatorbinjom.exe -f Makefile.Debug
jom: C:Documents and SettingsdfuserDesktoptest-build-desktop-Qt_4_8_1_for_Desktop_-MSVC2008_Qt_SDK__DebugMakefile.Debug [debugmain.obj] Error 2

jom 1.0.8 — empower your cores

jom: C:Documents and SettingsdfuserDesktoptest-build-desktop-Qt_4_8_1_for_Desktop_-MSVC2008_Qt_SDK__DebugMakefile [debug] Error 2
16:50:24: The process «C:QtSDKQtCreatorbinjom.exe» exited with code 2.
Error while building project test (target: Desktop)
When executing build step ‘Make’

Does anyone know what is the cause?

I don’t know if it’s relevant or not, but before getting this error I got the common error about cl nor found; I solved adding the path to cl in the project settings.

asked May 3, 2012 at 15:01

user1372813's user avatar

2

I’ve solved it : try to execute cl.exe directly (C:Program Files (x86)Microsoft Visual Studio 10.0VCbincl) if you get a dll error, it’s because your environment is not set correctly. So, you need to call vcvarsall.bat before lunch QtCreator. To do that each time, you can create a .bat file which contains the following:

C:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat

{Path to QtCreator}qtcreator

(Correct the paths if your configuration is not the same)

You will need to execute this script to get QtCreator with the right environment variables, otherwise, the dll error appears but is not reported, and you get this «Error : 2»

answered Oct 14, 2012 at 20:10

hl037_'s user avatar

hl037_hl037_

3,4601 gold badge26 silver badges58 bronze badges

3

I had somewhat similar problem in Qt 5.3

21:22:03: Running steps for project Server...
21:22:03: Configuration unchanged, skipping qmake step.
21:22:03: Starting: "C:QtQt5.3.2Toolsmingw482_32binmingw32-make.exe" 
C:makebin; -f Makefile.Debug
Makefile:34: recipe for target 'debug' failed
process_begin: CreateProcess(NULL, C:makebin; -f Makefile.Debug, ...) failed.
make (e=2): The system cannot find the file specified.

mingw32-make: *** [debug] Error 2
21:22:05: The process "C:QtQt5.3.2Toolsmingw482_32binmingw32-make.exe" exited with code 2.
Error while building/deploying project Server (kit: Desktop Qt 5.3 MinGW 32bit)
When executing step "Make"

I did the following to get rid of the error.
From the left pane of the Qt,

Projects > Build > Build Environment:

Check the Clear System environment

answered Oct 12, 2014 at 19:27

Kahn's user avatar

KahnKahn

7553 gold badges11 silver badges28 bronze badges

0

In Linux terminal:

sudo apt-get install build-essential cmake libqt4-dev

I’m sorry I don’t know why this code works but I had the same problem in Linux and I solved it this way.

Mateusz Piotrowski's user avatar

answered May 1, 2015 at 17:51

Amir Hossein's user avatar

I have had this issue many times and what fixed it for me was simply renaming the folder that the project was in.
Alternatively you could create a new project and just copy all your header and source files into that new project.

answered Dec 27, 2021 at 10:17

vatsk's user avatar

vatskvatsk

365 bronze badges

Okay so you can do this.

Go to Start->Choose Qt folder->minigw

When you start it you will be loaded int cmd, after that locate your project.
Then you can type: qmake and after that make and then you have built project

If it doesn’t work try to go trough the DOCUMENTATION to see how to use minigw when you are using Qt.

If you need anymore help let me know I’ll be glad to help you.

EDIT:

One more thing. In your question problem may be connected to environmental variables. As they are not probably set to show to the make command.
If you don’t want to bother with minigw you can maybe check your environmental variables if they have set path: to make

answered May 14, 2012 at 17:12

user123_456's user avatar

user123_456user123_456

5,61726 gold badges84 silver badges139 bronze badges

0

I create a new project with the same name in other folder, copy internal files except <project_name>.pro.user file.

This work form me, I don’t know why, but removing <project_name>.pro.user file from my original project error continues.

answered Jul 7, 2020 at 22:43

Anibal Anto's user avatar

Доброго времени суток.

Только поставил 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.

Подскажите, в чем может быть проблема?

0 / 0 / 1

Регистрация: 18.08.2014

Сообщений: 13

1

06.09.2014, 14:40. Показов 15872. Ответов 2


Студворк — интернет-сервис помощи студентам

14:26:09: Выполняются этапы для проекта untitled…
14:26:09: Запускается: «C:Qt5.2.1mingw48_32binqmake.exe» «D:программированиеМои проэктыqt1untitleduntitled.pro» -r -spec win32-g++ «CONFIG+=debug»
Cannot find file: D:программированиеМои проэктыqt1untitleduntitled.pro.
14:26:09: Процесс «C:Qt5.2.1mingw48_32binqmake.exe» завершился с кодом 2.
Ошибка при сборке/установке проекта untitled (комплект: Desktop Qt 5.2.1 MinGW 32bit)
When executing step «qmake»
14:26:09: Прошло времени: 00:00.

Вылетает такая хрень.
Во вкладке проекты( сборка/запуск) — qt 5.2.1 mingw 32 bit
компилятор mingw файл который собирает — C:QtToolsmingw48_32bing++.exe

я понимаю что компилятор глючит а в чем глюк не понимаю



0



596 / 396 / 79

Регистрация: 23.10.2013

Сообщений: 1,143

06.09.2014, 14:47

2

Нельзя использовать киррилицу в пути к проекту!!!
Уже миллион раз такие темы создавали!



0



0 / 0 / 1

Регистрация: 18.08.2014

Сообщений: 13

06.09.2014, 14:58

 [ТС]

3

Модераторам:
ребят закиньте это в топик для новичков, плиз, токо красными и огромными буквами спс

Тема закрыта / delete



0



IT_Exp

Эксперт

87844 / 49110 / 22898

Регистрация: 17.06.2006

Сообщений: 92,604

06.09.2014, 14:58

Помогаю со студенческими работами здесь

Ошибка на код
Выдаёт ошибку: EConvertError with message:&quot;-1′ is not a valid integer value’ на код:

var b:…

ошибка код 43
Всем привет, у меня такая проблема. После запуска системы в правом нижнем углу понели задач…

Ошибка код 43
Доброго времени суток! :yes: Переустановил ОС на ноуте, после чего не ложатся двайвера на видео…

Ошибка Код события: 7
Всем добрый день. Столкнулся с такой проблемой, есть новый компьютер и до недавнего времени работал…

Код Цезаря — ошибка
Доброго вечера, всем!
Все тот же стары добрый метод Цезаря… вот написала программу, но выдает…

560 ti ошибка код 43
вчера при запуске компьютера выдало ошибку код 43. сделал отчет в аида64 Где-то через час…

Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:

3

There seem to be no official documentation of exit codes for qmake. However, there are cases where the user is faced with such an exit code. The original list from ‘initek’ is no longer available.


0 Success
1 Command line error
2 Failed to find project file.
3 Error processing a project file, creating meta generator.
5 Error generating makefile
101 Failed to execute property action.

All of the above codes are generated in function runQMake() in the file main.cpp. The above list is exhaustive, i.e. there are no other codes that the user may be faced with.

The list below was created during a review of the qmake source code (the version in the source of Qt 5.1.1). The list is not guaranteed to be complete or correct. Please edit this article, if another error code appeared during qmake.

Code 0

Success. No errors encountered.

Code 1

The parsing of the commandline arguments has failed. Most probably a typo in the commandline. Look up «Running qmake» in the manual This should actually never happen when using Qt Creator.

Code 2

One of the project files cannot be found based on a call to QFile::exists(). The path in question is printed to stderr.

Code 3

The project file could not be evalutated correctly, or the meta file generator failed. (i.e. the meta files could not be created)

Code 5

Either the project or the make file could not be written (depending on qmake-mode). The filename of the makefile is printed to stderr.

Code 101

A property action failed:

  • Property action QMAKE_QUERY_PROPERTY: property not found in list
  • Property action QMAKE_SET_PROPERTY: internal error
  • cannot happen on property action QMAKE_UNSET_PROPERTY

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Понравилась статья? Поделить с друзьями:
  • R0011 ошибка шевроле круз
  • Qsp код ошибки 120
  • Qsp код ошибки 119
  • Qsp код ошибки 105
  • Qsl9 cummins коды ошибок