PDA

View Full Version : Build rules: Please assist



locus
3rd April 2007, 23:13
To use qt resources system, the docs says this


The .qrc file must be mentioned in the application's .pro file so that qmake knows about it. For example:
RESOURCES = application.qrc
qmake will produce make rules to generate a file called qrc_application.cpp that is linked into the application. This file contains all the data for the images and other resources as static C++ arrays of compressed binary data. The qrc_application.cpp file is automatically regenerated whenever the .qrc file changes or one of the files that it refers to changes. If you don't use .pro files, you can either invoke rcc manually or add build rules to your build system.


I would like to know how to add a build rule to my build system in visual studio .net 2003 ide to ensure that whenever i change the a file that the .qrc file refers to, then the generated qrc_application.cpp file will also be updated.

all suggestions welcomed.

Thanks in advance.

wysota
4th April 2007, 08:15
I don't think it is easy to do (if possible at all) as files which are used are stored only in the qrc file itself, so you'd have to find a way to peek into the file and extract its contents and tell VS to use them as dependecies.