Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Explanation RCC with -binary option
Forum Updated to NodeBB v4.3 + New Features

Explanation RCC with -binary option

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • FerniF Offline
    FerniF Offline
    Ferni
    wrote on last edited by
    #1

    Hi everyone!

    Could someone explain how do qrc and rcc work? I'm woring wth an application that loads in runtime some plugins. Now, I'm trying to use qrc to hide all my resources and the part from my application wokrs great.
    The problem is that I cannot create the external binary with RCC and that is probably because I'm doing something wrong.

    I have my resources.qrc file that includes all the resources. In my .pro I wrote: QMAKE_RESOURCE_FLAGS += -binary PATH_TO_resources.qrc -o NAME.rcc and I added RESOURCES += resources.qrc

    I get in output folder resources.cpp, resources.o, resources.tmp.o and NAME.rcc but I was expecting to have some .so or .a library that could be linked with my application or with other libraries.

    I would like to divide my plugin in libPlugin (c++ code), libImages, libSounds and libQML. With this structure I could only recompile the part that was modified (normaly the code or qml).

    It is possible to do what I'm thinking? Could someone explain me how to achieve this?

    Thanks,
    Fernando

    1 Reply Last reply
    0
    • FerniF Offline
      FerniF Offline
      Ferni
      wrote on last edited by
      #2

      Ok...running rcc -binary PATH_TO_resources.qrc -o NAME.rcc works perfect. How can I do to make the same within .pro file?

      mrjjM 1 Reply Last reply
      0
      • FerniF Ferni

        Ok...running rcc -binary PATH_TO_resources.qrc -o NAME.rcc works perfect. How can I do to make the same within .pro file?

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Ferni
        Hi
        You can try with something like
        QMAKE_POST_LINK=rcc xxx

        http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-post-link

        http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output

        1 Reply Last reply
        1
        • FerniF Offline
          FerniF Offline
          Ferni
          wrote on last edited by
          #4

          Hi @mrjj , thanks for your reply.
          I would like to do the whole process in Qt within my .pro file. I had to write a bash script to call RCC tool and copy the output where I want but I would like to do it in a more transparent way, everything inside my ..pro :(

          I coudn't try what you suggest but I think that I will do that later.

          1 Reply Last reply
          0
          • FerniF Offline
            FerniF Offline
            Ferni
            wrote on last edited by
            #5

            I solved this using a bash script and from .pro just run it with system(path_to_script.sh). It was the best way because QMAKE_POST_LINK didn't run the script after every build. It only worked with first build or rebuild.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved