qt application 64 bit windows

倖福魔咒の 提交于 2019-12-17 19:41:32

问题


Is it possible to compile a 64 bit executable in qt windows?

Is it the same process as with 32 bit or any different?


回答1:


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




回答2:


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.




回答3:


There is also an (inofficial) installer of the qt-libraries etc. for 64-bit Windows. You might want to have a look at that:

http://code.google.com/p/qt-msvc-installer/

(Just in case you don't want to spend a few hours compiling qt yourself... :D)



来源:https://stackoverflow.com/questions/2176048/qt-application-64-bit-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!