[英]Application has failed to start because MSVCP100D.dll was not found, reinstalling app may work
I googled on this and realized there are probably several causes to this so I will describe my scenario. 我在谷歌上搜索并意识到可能有几个原因,所以我将描述我的情景。
This happens when my application tries to load a .dll file built in another version of Visual Studio (2010), if I build the same project on Visual Studio 2008 the DLL file loads just fine... 当我的应用程序尝试加载在另一个版本的Visual Studio(2010)中构建的.dll文件时,会发生这种情况,如果我在Visual Studio 2008上构建相同的项目,则DLL文件加载得很好......
I don't know if it matters, but Visual Studio 2010 DLL file version is built on Windows 7 x32, and Windows Vista 64-bit is on the other side with Visual Studio 2008. 我不知道它是否重要,但Visual Studio 2010 DLL文件版本是在Windows 7 x32上构建的,而Windows Vista 64位则是在Visual Studio 2008的另一端。
If you link dynamically to the MSVC runtime then you need to install that runtime on every machine that will run your app. 如果动态链接到MSVC运行时,则需要在将运行应用程序的每台计算机上安装该运行时。
Note that in this case you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime. 请注意,在这种情况下,您似乎链接到运行时的调试版本,分发与运行时的调试版本链接的应用程序是不正常的。
If you do not want to distribute the runtime, then you can switch your Runtime Library options in Visual Studio (Properties -> C/C++ -> Code Generation -> Runtime Library) from /MD to /MT or from /MDd to /MTd. 如果您不想分发运行时,则可以将Visual Studio中的运行时库选项(属性 - > C / C ++ - >代码生成 - >运行时库)从/ MD切换到/ MT或从/ MDd切换到/ MTd 。
As others have said, if you are distributing this application you should be linking dynamically or statically to the Release version of the Runtime library, not the Debug version. 正如其他人所说,如果您要分发此应用程序,则应该动态或静态地链接到Runtime库的Release版本,而不是Debug版本。
Just an small related advice: DON'T ADD any *248d.lib files while building and running in the RELEASE version. 只是一个小的相关建议:在RELEASE版本中构建和运行时,不要添加任何* 248d.lib文件。
I was following advice from different blogs, and I accidentally added both *248d.lib as well as the 248.lib files. 我正在关注不同博客的建议,我不小心添加了* 248d.lib以及248.lib文件。 Basically in Linker → Input → Add Dependencies , ensure that you don't have *248d.lib files in it (here 248 is version 2.4.8).
基本上在链接器 → 输入 → 添加依赖项中 ,确保您没有* 248d.lib文件(此处248是版本2.4.8)。
I spent hours wondering why things weren't working in the release mode until it struck me that there are two copies of .lib files, one *248 and other *248d. 我花了好几个小时想知道为什么事情在发布模式下没有工作,直到我发现有两个.lib文件副本,一个* 248和其他* 248d。 If you include any of the d files in release mode, you will get the DLL issue.
如果在发布模式下包含任何d文件,则会出现DLL问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.