How to leave including inherited classes?
Hi,
this might be not a Qt-related question but as I would like to apply it in a Qt project maybe it has some connections. I made some nice working classes preveously which should be used now. There is some inheritance relationship between them, so say I have these:
first.h // class First
first.cpp
second.h // class Second : public First
second.cpp
Now if I want to use Second in my project I have to include also first.h and first.cpp.
For I have more than one relationships like this it would be nice just start the chain and tell somehow the project "follow the include series please" without including them actually to the project. Is it possible at all or dream little girl, dream? What should be the keywords for the topic? If I'm right this should be something like building a custom library but honestly I'm lost.
Re: How to leave including inherited classes?
You may need use some code static analsis tool, and see the dependancy tree, and inclide all the required files in the project manually.
It is possible to put all the files into a folder and compile all of them, and linker will link only the required files, but I don't think Qt Tool set support this, ecclipse does support this kind of feature, but you need write a custom make file (to make it work with Qt), (and not use qmake outputed make file). If you want to use qmake outputed make file, I think manually adding file by file to the .pro file (or the to project if using QtCreator) is the only option.
As you already see, creating a library(either static or dynamic) would be nice idea (and reusable solution), I would suggest to do this, if the dependancy list is large enough to be difficult to manually manage them