I have an exe that depends on multiple static libs and in visual studio, they are all managed as part of 1 sln file and the exe has dependencies on the static libs.
How can this be set up in Qt Creator? Seems like there are 2 options:
1. create multiple projects in a Qt Creator “session”. But a session is not shared among users, right? so i’m not sure how that would work? For example, is there a session file that gets created?
2. use subprojects. and make the static lib sub projs of the exe?
Any recommendations? I’m totally new to Qt Creator and need to use it for a linux port.
Thanks!
To get
qmaketo produce a nice.slnwith subprojects, make one main.profile with thesubdirstemplate, and set the necessary dependencies of each project on another.QtCreator uses
qmakebehind the scenes to generate a makefile and build from that, but you can also produce VS solution files by runningYou can also use the Qt Visual Studio add-in to GUI-ify the process.
Also: to make sure the executable is relinked each time a dependant static lib is changed, use
Place something like this in your executable’s
.profile, with the note that the LIBSUFFIX part is completely optional, but in line with how Qt itself is built, so that’s what I use too. Mind the “release” and “debug” subdirectories absent on Linux/Mac builds. And to be complete: the rather verboseif-elsecondition isThe Right Way (TM)to differentiatedebugfromreleasebuilds in qmake project files. Simpler ways may break under several circumstances.