PDA

View Full Version : build debug with shared and release with static?



Thor28
14th April 2008, 20:38
I see how to build QT for either static or shared. And I see how to build debug and release. But is it possible to use debug/shared and release/static for ongoing development?

I like the speed and size during development, but want to minimize file distribution for testing/release.

Thanks.

jacek
14th April 2008, 22:55
You can have two builds --- one static and one dynamic. To switch between them you just have to run appropriate qmake binary (provided that you use qmake).You can even make a qmake-static and qmake-dynamic symlinks to speed things up.

Thor28
14th April 2008, 23:04
Yes, but could I use them at the same time without rebuilding QT?

I think I am not expressing myself clearly. If I understand correctly, using the two different qmake options would force me to rebuild QT each time that I switched between debug/shared and release/static. That is what I was trying to avoid.

Would switching between the two setups require rebuilding QT each time? It seems that whenever I run qmake, the previous setup is removed.

jacek
14th April 2008, 23:21
Would switching between the two setups require rebuilding QT each time?
No, those two setups won't know anything about each other.


It seems that whenever I run qmake, the previous setup is removed.
Where do you run qmake?

If you have different Qt builds in different directories each of them has its own qmake binary. To make your project use some Qt build, you have to run qmake from that build's bin directory. This works the best with "out of source" building style.

Thor28
14th April 2008, 23:32
OK, sounds like I need to have two separate directory trees for this. Thanks.