views:

901

answers:

2

Hi,

Is it possible to compile a 64 bit executable in qt windows. Is it the same process as with 32 bit or any different.

Brgds,

kNish

A: 

Have a look at this wiki page. I describes how to build the Qt binaries from source for different configurations.

Frank Bollack
checked it. It suggests "preparing Qt for Visual Studio". I need to make an application for windows 64 bit using qt. is it possible. otherwise 32bit should work. however, difference between the two may show up during performance. correct me if i am wrong.
knishua
+1  A: 

I'm not sure if I understand your question completely, but I can tell you about my project and see if it helps your situation.

We have:

  1. Visual Studio 2008 C++ project
  2. Contains both Win32 and x64 platforms (in other words, it can be 32-bits or 64-bits)
  3. We save the original Qt libraries that came with the Qt installer in one directory (e.g. Qt/lib/x32), and re-built Qt as 64-bits and save that in another directory (e.g. Qt/lib/x64).
  4. When it comes to linking, we just ensure that we link with the correct library (32-bit platform links to 32-bit Qt, and so on).

This has worked quite well for us.

So if I had to guess the answer to your question.

Yes, it's possible to compile a 64-bit executable in Qt on Windows. It's the same process, except you have to tell the qmake a little bit different parameter. See Frank Bollack link above on how to build it.

Note, if you app is 64-bit (x64), and you try to link 32-bit Qt (the one that came with the installer), it will not link.

Hope this helps.

ShaChris23