简体   繁体   English

将QT 32位库与64位应用程序链接(MinGW64编译器)?

[英]Link QT 32Bit libraries with 64 Bit Application (MinGW64 compiler )?

Greetings all, 大家问候

In my application I need to allocate memory beyong 4GB memory-address-space.So I need compile my application in 64Bit. 在我的应用程序中,我需要在4GB的内存地址空间之间分配内存,因此我需要在64Bit中编译我的应用程序。

My development environment is QT 32 bit libraries(LGPL),and going to use MinGW64 to compile 64bit build. 我的开发环境是QT 32位库(LGPL),并将使用MinGW64来编译64位构建。 Since QT doesnt support MinGW64 (only 32bit supported) , can I link 32Bit QT libraries against with my 64Bit application ? 由于QT不支持MinGW64(仅支持32位),我可以将64位应用程序链接到32位QT库吗?

Thanks in advance. 提前致谢。

No, you can't. 不,你不能。 64-bit process cannot load 32-bit DLL. 64位进程无法加载32位DLL。

@umanga My reply does not answer your question, but it might give you detail on what you actually want to do--building Qt 64-bit libraries using MinGW-w64. @umanga我的答复没有回答您的问题,但可能会为您提供您实际上想做什么的详细信息-使用MinGW-w64构建Qt 64位库。

As suggested by MSalters, porting Qt to the 64-bit environment may be simpler. 正如MSalters所建议的,将Qt移植到64位环境可能更简单。 Also, Qt 4.7 is 99.99% compatible with current MinGW-w64. 另外,Qt 4.7与当前的MinGW-w64兼容99.99%。 I just tried building Qt 4.7 using MinGW-w64 myself this morning (Webkit is included, but Phonon is not). 我今天早上刚刚尝试使用MinGW-w64构建Qt 4.7(包括Webkit,但不包括Phonon)。

You only need to modify one line of Qt source code to get a successful Qt build. 您只需修改一行Qt源代码即可成功构建Qt。 The detailed steps are provided in my blog -- "after all, it is Open Source.". 我的博客中提供了详细步骤-“毕竟,它开源的”。

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

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