开发者

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

I was wond开发者_如何学Goering 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜