C ++可执行文件-找不到MSVCR100.dll错误 [英] C++ executable - MSVCR100.dll not found error

查看:95
本文介绍了C ++可执行文件-找不到MSVCR100.dll错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载并编译了一个开源C ++应用程序 Fhhed .

I've downloaded and compiled an open-source C++ application, Frhed.

运行我编译的版本时,它需要MSVCR100和其他几个dll文件(Visual C ++可再发行的一部分).但是,当我运行原始的预编译的Frhed可执行文件时,它运行时未安装任何C ++可再发行软件包.

When I run the version I've compiled, it demands MSVCR100 and few other dll files (part of Visual C++ redistributable). However, when I run the original precompiled Frhed executable, it runs without any C++ redistributable package installed.

我是否必须修改任何编译选项才能将程序与C ++可再发行库断开链接?

Do I have to modify any compilation options in order to unlink the program from the C++ redistributable libraries?

推荐答案

原始程序可能是静态链接,而您试图动态链接可执行文件,这会导致文件更小,但是对MSVCR100.dll(Microsoft C运行时库的v10)内部函数的依赖,如果您进行静态链接,该依赖关系将包含在可执行文件中.

The original program is probably statically linked, whereas you are trying to dynamically link your executable, which results in a smaller file, but a dependency on functions inside MSVCR100.dll (v10 of the Microsoft C Runtime Library), which would have been included inside the executable if you were statically linking.

要静态链接DLL,请进入项目属性,并将生成方式从MD更改为MT.在Visual Studio 2010/2012中,该项目属性为C/C ++->代码生成->运行时库.

To statically link DLLs, go into your project properties and change the build mode from MD to MT. In Visual Studio 2010/2012, that project property is C/C++ -> Code Generation -> Runtime Library.

这篇关于C ++可执行文件-找不到MSVCR100.dll错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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