如何构建QTcore4.dll而不依赖于MSVCx80.dll? [英] How to build QTcore4.dll without dependency to MSVCx80.dll?

查看:319
本文介绍了如何构建QTcore4.dll而不依赖于MSVCx80.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows屏幕保护程序,我想使用QT库重新编译,以便我可以提供更多的平台。
我在Vista和XP上面临部署问题。



我用MT静态编译我的屏幕保护程序,并运行依赖关系检查器。
结果是:



MyScreensaver.SCR需要几个DLLS,QTCORE4.DLL,但没有MSVCx80.DLL。
到目前为止这是很好的。



我的问题是QTCORE4.DLL依次,确实需要MSVCP80.DLL和MSVCR80.DLL
As结果我的应用程序不在Vista系统上运行。



我可以将QTCORE4.DLL建立静态链接到微软库(可能是Libcmt.lib?),以便我在MS CRT DLL中没有任何依赖关系?



限制:





在各个方向尝试解决方案后,似乎最可行的一个是使用QTCore4.dll和QTGui4.dll,但将它们静态链接到MSVCRT。这样,我的程序和QT DLL都不会依赖于MSVCRT dll。



有没有解决方案?
(我是QT编程的新手)



谢谢,
Michael

解决方案

您有两个选项:




  • 这些依赖关系是 Microsoft Visual C ++ Runtime 库,您可以将该库部署到您的installshield和用户默认安装它,默认情况下,MSVCRT库不包括在Windows中,您必须必须在您的installshield中部署运行时库,并在您的...中复制 Qt * .dll DLL应用程序目录。


  • 使用运行时和Qt主依赖关系的静态链接,此选项有一个可执行文件,但要静态编译Qt,您必须具有商业使用的Qt商业许可。



I have a windows screensaver that I want to recompile using the QT libraries, so that I can make available for more platforms. I am facing problems with the deployment on Vista and XP.

I compile my screensaver statically with MT, and run the dependency checker. The results are:

MyScreensaver.SCR needs several DLLS, QTCORE4.DLL but no MSVCx80.DLLs. So far this is fine.

My problem is that QTCORE4.DLL in its turn, does need MSVCP80.DLL and MSVCR80.DLL As a result my application does not run on Vista systems.

Can I build QTCORE4.DLL to be statically linked the the microsoft libraries (maybe Libcmt.lib ?) so that I do not have any dependencies in the MS CRT DLLs?

Limitations:

After trying for solutions in various directions, it seems the most feasible one is to use the QTCore4.dll and QTGui4.dll, but having them linked statically to MSVCRT. In this way, neither my program, nor the QT DLLs will have dependencies on MSVCRT dlls.

Is there a solution to this? ( I am new to QT programming )

Thank you, Michael

解决方案

You have two options:

  • Those dependencies are part of Microsoft Visual C++ Runtime Library, you can deploy that library in your installshield and user silently installs it, MSVCRT library not included in Windows by default, you must deploy runtime library in your installshield and copy Qt*.dll DLLs in your application directory.

  • Use Static Linking of Runtime and Qt main dependencies, with this option you have one executable file, but to static compile of Qt you must have Qt commercial License for commercial use.

这篇关于如何构建QTcore4.dll而不依赖于MSVCx80.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆