删除msvc dlls依赖关系以运行qt应用程序 [英] remove msvc dlls dependency to run qt application

查看:116
本文介绍了删除msvc dlls依赖关系以运行qt应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除msvc dll(例如:msvcr100.dll)依赖项以运行qt应用程序? 我已经开发了一个qt应用程序,该应用程序在dveloper机器上运行得很好,但是无法在任何其他机器上运行,都会出现错误消息由于计算机缺少MSVCR100.dll,因此程序无法启动".我可以通过在应用程序文件夹中复制该文件来解决此错误,但是我不想复制,而是想静态链接或通过其他方式删除该依赖项.

How to remove msvc dlls (example: msvcr100.dll) dependency to run qt appliation? I've developed a qt application which runs just fine in dveloper machine but unable to run on any other machine gives error message "program can't start because MSVCR100.dll is missing from your computer". I can solve this error by copying that file in the application folder but I dont want to copy, instead I want to link statically or some other way to remove that dependency.

预先感谢

推荐答案

问题是您可能正在尝试在安装了不同于Visual Studio(MSVC)版本的计算机上运行应用程序自己构建应用程序.

The issue is that you are probably trying to run an application on a machine which has a different Visual Studio (MSVC) version installed than the version that was used for building your application itself.

通常,正确的解决方案是在目标计算机上安装相应的Visual Studio可再发行软件包.这不是解决方法"或黑客",因为如果您希望使用使用不同的运行时库等构建的应用程序,则可以预期.在这里您可以阅读更多有关它的信息:

Generally, the correct solution is to install the corresponding Visual Studio redistributable package on the target machine. It is not a "workaround" or "hack" because if you wish to use an application built with different runtime libraries, etc, then it is expected. Here you can read a bit more about it:

重新分发Visual C ++文件

是的,这有点不幸,而且显然MS并没有设法使其成为最理想的,但是毕竟,它足够简单,可以绕开它.请注意,目标计算机不仅会给您的应用程序带来问题,而且通常还会出现任何以类似方式分发的问题.

Yes, it is a bit unfortunate, and apparently MS has not managed to make it the most ideal, but after all, it is simple enough to circumvent. Note that the target machine would not only have issues with your application, but in general with any distributed in a similar fashion.

解决该问题的另一种方法是使用与目标计算机上安装的环境相同的环境来构建应用程序,但是如果您需要将应用程序提供给具有通用设置的多台计算机,这很容易成为麻烦.现在,我会说这是骇人听闻"的方法.

The other way to solve the issue is to build the application with the same environment that is installed on the target machine, but this can easily go haywire if you need to supply the application to several machines with versatile setup. Now, I would say this is the "hackish" approach.

您将需要从此处获取针对此特定问题的可重新分发文件:

You will need to grab the redistributable for this particular problem from here:

Microsoft Visual C ++ 2010可再发行组件包(x86)

Microsoft Visual C ++ 2010可再发行组件包(x64)

即使您因以某种方式静态地破解此漏洞而失败,使用带有DLL和静态库等的应用程序时,也需要处理令人讨厌的后果.

Even if you went down for statically hacking this around somehow, you would need to deal with nasty consequences when using your application with DLLs and static libraries, etc.

这篇关于删除msvc dlls依赖关系以运行qt应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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