PDA

View Full Version : the "qrc_res.cpp" doesn't exist after compiling



Hughen
16th October 2012, 16:02
I writed a program by Qt Creator(2.4.1), but now the program doesn't complete compile.
the error:
d:\QtSDK\4.8.3\bin\qmake.exe -spec ..\..\QtSDK\4.8.3\mkspecs\win32-g++ -o Makefile ..\ChooseSeat\ChooseSeat.pro
Can't find the specified path.
Can't find the specified path
D:/QtSDK/mingw/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `D:/QtApp/ChooseSeat-build-desktop-Qt_4_8_3__4_8_3____'
bin\rcc.exe -name res ..\ChooseSeat\res.qrc -o release\qrc_res.cpp
mingw32-make[1]: Leaving directory `D:/QtApp/ChooseSeat-build-desktop-Qt_4_8_3__4_8_3____'
process_begin: CreateProcess(NULL, bin\rcc.exe -name res ..\ChooseSeat\res.qrc -o release\qrc_res.cpp, ...) failed.
make (e=2): Can't find the specified path
mingw32-make[1]: *** [release/qrc_res.cpp] Error 2
mingw32-make: *** [release] Error 2
21:19:20: process"D:\QtSDK\mingw\bin\mingw32-make.exe"exit,exit code 2.
Error while building/deploying project ChooseSeat (target: desktop)
When executing step 'Make'

My .pro file:
RESOURCES += res.qrc
and the res.qrc file is normal.
res.qrc:
<RCC>
<qresource prefix="/">
<file>res/about/about.png</file>
<file>res/login/pw.png</file>
<file>res/login/user.png</file>
<file>res/mainWin/about.png</file>
<file>res/mainWin/exit.png</file>
<file>res/mainWin/find.png</file>
<file>res/mainWin/help.png</file>
</qresource>
</RCC>
every file is existed in res.qrc

What I should do?

ChrisW67
16th October 2012, 23:22
Diagnose the fault with your Qt SDK/Qt build environment. It is fairly obvious that there are several error messages in the output you posted indicating that bot qmake and rcc were not found or were having issues. These paths, for example, are not typical of a standard QtSDK installation:


d:\QtSDK\4.8.3\bin\qmake.exe
bin\rcc.exe

I would expect both to be of the form:


d:\QtSDK\Desktop\4.8.3\bin\qmake.exe
d:\QtSDK\Desktop\4.8.3\bin\rcc.exe

Talei
17th October 2012, 01:21
This is one of the 3 bugs that hunted me (well not only me) in past few days after going to the 4.8.3.

Honestly 4.8.3 is the worst release ever - up till now I didn't have any problem with the Qt upgrade.

Back to the problem:
The problem is with the path to the rcc.exe.

Look into this bugreport for the soulution:
https://bugreports.qt-project.org/browse/QTBUG-27237

Hughen
17th October 2012, 18:14
should I reinstall the qt-win-opensource-4.8.3-mingw?
and install it in d:\QtSDK\Desktop
why?
I'm not sure what you mean

Added after 16 minutes:

should I reinstall the qt-win-opensource-4.8.3-mingw?
and install it in d:\QtSDK\Desktop
why?
I'm not sure what you mean

ViRuSTriNiTy
17th October 2012, 21:11
Hi Hughen,

your log states:

d:\QtSDK\4.8.3\bin\qmake.exe -spec ..\..\QtSDK\4.8.3\mkspecs\win32-g++ -o Makefile ..\ChooseSeat\ChooseSeat.pro
Can't find the specified path.

It is not clear what Can't find the specified path means. Is the location d:\QtSDK\4.8.3\bin\qmake.exe correct? If yes then qmake cannot process the parameters as specified, thus the execution directory does not match with the relative locations given for -spec and -o. You have to find out and fix this for yourself as we don't have your environment (or attach your project to the next post if this is even possible).

All other errors reported by the log are not relevant yet as those are printed out by calls stated in the MakeFile generated by qmake - and qmake did not create a valid MakeFile due to the first error. So you should concentrate on solving the first error.

Talei
18th October 2012, 03:43
OMG... Virus.. Hughen
Did any of You read the link that I posted?
The correct answer that fix problem is already given, and no one is talking about reinstalling.

Btw. The problem is with this:
process_begin: CreateProcess(NULL, bin\rcc.exe -name res ..\ChooseSeat\res.qrc -o release\qrc_res.cpp, ...) failed.
With means that on Windows platform API function CreateProcess can't start program bin/rcc.exe. Depending on settings in the QtCreator current working directory is the directory with the .pro. So %pathToYourProjectPRO%/bin/rcc.exe can't be found. And thats probably ok, because You didn't installed QtSDK in the newly created project directory did You?
Look at the link that I posted for the answer.

Hughen
18th October 2012, 07:39
Thank you, I'm sorry, there is nobody poisoning, and the ping is bad, so.....

My problem is solved by your idea, thanks.
CreateProcess doesn't find rcc.exe, and I add "QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe" after the QMAKE_IDC line in qmake.conf(for me its: D:\QtSDK\4.8.3\mkspecs\win32-g++)