2

I need to create binary external resource file due to the fact that I'm working with multiple large images. I tried to create it from the commandline in Qt Creator as stated in the documentation (with rcc -binary image.qrc -o image.rcc command, where image.qrc is my already created .qrc file, also located in the working directory), but so far without a luck.

If I understand correctly, running application with this command should generate image.rcc file in the working directory, right? Currently, when I run my application, it starts but file isn't created anywhere. There is no error, no nothing. I would appreciciate anyones help, because I run out of ideas.

I use Qt 5.8 and MinGW 32bit compiler (but tried it also with MSVC2010 32bit and Qt 5.4.2 and still without success).

EDIT: My qrc file (I reduced the number of files just for the tests).

<RCC>
    <qresource prefix="/">
        <file>images/dm.png</file>
        <file>images/mountains_op.png</file>
    </qresource>
</RCC>
4
  • show your .qrc file Commented Sep 2, 2017 at 14:00
  • Done. I forgot to include it before, sorry! Commented Sep 2, 2017 at 14:07
  • Run the following command and tell me what message you get: rcc -binary image.qrc -o image.rcc --verbose Commented Sep 2, 2017 at 14:16
  • 1
    Yeah, I found the solution. Thanks, your suggestion pointed me in the right direction! Commented Sep 2, 2017 at 14:45

1 Answer 1

1

I found a solution (mostly thanks to @eyllanesc comment). I needed to change the directory in the command line to the one where rcc.exe is located. I kept trying to run: rcc -binary image.qrc -o image.rcc from the working directory of my project and not from the directory of Qt, where rcc.exe actually is.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.