I've been using Qt Creator for a while now and my project is getting large enough that I'd like to move to using Qt's SUBDIRS template type to better organize my growing project.
The structure of my project is similar to the following
/master
|--- master.pro
`--- project1
| |--- project1.pro
| `--- ... (source files specific to project1)
`--- project2
| |--- project2.pro
| `--- ... (source files specific to project2)
`--- shared
`--- ... (source files shared between project1 and project2)
Both project1 and project2 are separate independent projects, but that have some source/header files that they share for convenience and maintainability in the shared folder.
The bulk of my development time generally is spent working on the shared files and project1. So as I make changes to shared files both project1 and project2 must, in the end, be updated to work with these shared file.
My problem is, say I've just made changes to shared files AND project1 but have not yet updated project2. How do I, from QtCreator run project1 so I can test my changes? Obviously at the end of the day/week/month I'd fix project2 to work with these changes, but how would I run project1 in the mean time?
If I right-click on project1, it shows the "run" option. However, for this to work here, the entire "master.pro" has to be able to compile without errors.
I know as a workaround, I could just load project1.pro by itself, but I'd like to load master.pro and run it from the subproject.
Any help on this would be greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…