PDA

View Full Version : Best way to make 2 different programs from the same code



Cremers
21st March 2014, 12:39
Hi,
I have made an app using qt 5.2 for android. Now I want to make two versions, one normal and one with very limited functionality.
Can qt creator do this from the same map with code, so all I have to do is make another pro file, then use some #defines? Will there be no conflicts building the two versions? Or should I put all code in a separates map for the two projects (which isn't too much work because the limited version will be build only occasional)?
Thanks!

anda_skoa
21st March 2014, 14:41
You can do that with two .pro files or one .pro file with conditional sections.

For building you should probably use two different build directories though, to ensure each program see its version of the generated object files when linking

Cheers,
_

Cremers
22nd March 2014, 11:32
Thank you. I will use two profiles and different build directories.