Explanation RCC with -binary option
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?
Ok...running rcc -binary PATH_TO_resources.qrc -o NAME.rcc works perfect. How can I do to make the same within .pro file?
You can try with something like
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.
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.