How to setup a QMake project compiling to lib, and a second QMake project that uses that lib as a dependency.



  • For example in visual studio you can create a solution and have a project inside that solution compile to a lib and other projects in that solution can be set as dependencies and anytime you build one of those projects the ide checks the lib project to compile it first if there are changes. How can I do something similar in QtCreator. I'm using 2.8, linux gcc, these projects don't use the Qt Libraries.



  • Just to clarify I already have the two projects, I just need to know how to link them as one depending on the other and getting that auto build for the lib project, if possible.



  • Hi,
    You need create a subdir project.



  • I did this and it seems like I can't add an already existing QMake project to a subdirs project. Do I have to recreate the projects with making a subdirs project?



  • No you can add existing project to a subdir project.
    New subproject - > Other project - > Import existing project
    or edit .pro file manually.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.