Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: How to setup Qt for a project that contains both 32-bit and 64-bit platforms?

I was wondering if anyone has experience with maintaining a Qt application on Visual Studio (2008+) that has both Win32 (32-bit) and x64 (64-bit) platforms?

The default Qt project comes with only the 32-bit library. While I know how to build Qt as 64-bit, how do you setup Visual Studio, Qt, etc such that you can easily switch between the two?

like image 513
sivabudh Avatar asked Apr 08 '10 21:04

sivabudh


1 Answers

We are currently doing this. Our way for doing this uses inherited property sheets.

We first create a master property sheet that contains all the settings, paths, macros, etc that are common to all configurations. We find placing these in the root directory of the solution to be the most convenient way.

Then for each configuration, debug/release & 32/64bit we made 4 separate build property sheets that -

  1. Each Inherit the master property sheet (use View/Property Manager on VS toolbar).
  2. Configure each sheet to link to the correct Qt library dll.

Now for the tedious part - For each project in your solution, there are 4 separate properties. You now have to inherit each build property sheet into the respective property settings of the project. For example, 32bit release build property sheet has to be inherited by the 32bit release property settings.

Assuming all Qt dll's are in the same directory, all configuration should work the same.

like image 170
photo_tom Avatar answered Nov 07 '22 14:11

photo_tom