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

I was wondering if anyone has experience with a Qt application in Visual Studio (2008+), which has both Win32 (32-bit) and 64-bit (64-bit) platforms?

The Qt project by default has only a 32-bit library. Although I know how to build Qt as 64-bit, how do you configure Visual Studio, Qt, etc., so that you can easily switch between them?

+6
qt visual-studio
source share
1 answer

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

First, create a wizard properties page that contains all the settings, paths, macros, etc. that are common to all configurations. We believe that their location in the root directory of the solution is the most convenient way.

Then, for each debug / release and 32 / 64bit configuration, we made 4 separate assembly properties sheets, which are

  • Each inherits the master property sheet (use View / Property Manager on the VS toolbar).
  • Configure each sheet to reference the correct dll library of the Qt library.

Now for the tedious part. There are 4 separate properties for each project in your solution. Now you need to inherit each page of assembly properties into the corresponding project properties settings. For example, a 32-bit release build property page should be inherited by 32-bit release property settings.

Assuming all Qt dlls are in the same directory, the whole configuration should work the same.

+1
source share

All Articles