windows qt 应用程序 64 位窗口
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2176048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
qt application 64 bit windows
提问by nish
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 位相同的过程还是有任何不同?
采纳答案by Frank Bollack
回答by sivabudh
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:
我们有:
- Visual Studio 2008 C++ project
- Contains both Win32 and x64 platforms (in other words, it can be 32-bits or 64-bits)
- 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).
- 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).
- Visual Studio 2008 C++ 项目
- 包含 Win32 和 x64 平台(换句话说,它可以是 32 位或 64 位)
- 我们将 Qt 安装程序附带的原始 Qt 库保存在一个目录中(例如 Qt/lib/x32),并将 Qt 重新构建为 64 位并将其保存在另一个目录中(例如 Qt/lib/x64)。
- 当涉及到链接时,我们只是确保我们链接到正确的库(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. 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.
是的,可以在 Windows 上的 Qt 中编译 64 位可执行文件。这是相同的过程,除了您必须告诉 qmake 有点不同的参数。有关如何构建它,请参阅上面的 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 notlink.
请注意,如果您的应用程序是 64 位 (x64),并且您尝试链接 32 位 Qt(安装程序附带的那个),它将无法链接。
Hope this helps.
希望这可以帮助。
回答by Jan Rüegg
There is also an (inofficial) installer of the qt-libraries etc. for 64-bit Windows. You might want to have a look at that:
对于 64 位 Windows,还有一个(非官方的)qt-libraries 安装程序。你可能想看看:
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)