简体   繁体   English

qt应用程序64位窗口

[英]qt application 64 bit windows

Is it possible to compile a 64 bit executable in qt windows? 是否可以在qt windows中编译64位可执行文件?

Is it the same process as with 32 bit or any different? 它是否与32位或任何不同的进程相同?

Have a look at this wiki page. 看看这个维基页面。 I describes how to build the Qt binaries from source for different configurations. 我描述了如何从源代码为不同的配置构建Qt二进制文件。

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 Visual Studio 2008 C ++项目
  2. Contains both Win32 and x64 platforms (in other words, it can be 32-bits or 64-bits) 包含Win32和x64平台(换句话说,它可以是32位或64位)
  3. We save the original Qt libraries that came with the Qt installer in one directory (eg Qt/lib/x32), and re-built Qt as 64-bits and save that in another directory (eg Qt/lib/x64). 我们将Qt安装程序附带的原始Qt库保存在一个目录中(例如Qt / lib / x32),并将Qt重新构建为64位并将其保存在另一个目录中(例如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). 在链接方面,我们只确保链接到正确的库(32位平台链接到32位Qt,依此类推)。

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. 是的,可以在Windows上的Qt中编译64位可执行文件。 It's the same process, except you have to tell the qmake a little bit different parameter. 这是相同的过程,除了你必须告诉qmake一个不同的参数。 See Frank Bollack link above on how to build it. 请参阅上面的Frank Bollack链接,了解如何构建它。

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. 请注意,如果您的应用程序是64位(x64),并且您尝试链接32位Qt(安装程序附带的那个),它将不会链接。

Hope this helps. 希望这可以帮助。

There is also an (inofficial) installer of the qt-libraries etc. for 64-bit Windows. 对于64位Windows,还有一个(非官方的)qt-libraries等安装程序。 You might want to have a look at that: 你可能想看一下:

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

(Just in case you don't want to spend a few hours compiling qt yourself... :D) (万一你不想花几个小时自己编译qt ......:D)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM