I\'m trying to run an application that I\'ve recently developped onto another computer and which I\'ve compiled using VS2013.
Running it I get:
<
The program can't start because mfc120ud.dll is missing from your computer. Try reinstalling the program to fix this problem.
That is one of the debug libraries for MFC. That's the library that you link against when you build debug releases of your program. It is present on your developer machine, but you cannot redistribute it.
You need to do the following:
I've copied/pasted the mfc120ud.dll version from System32
You are not allowed to do that. Retrace your steps and undo that.
Check if you've accidentally defined _DEBUG in your preprocessor definitions.
I once had the same error when I copy pasted settings from the debug build.
For me, I build the project using VS2013 xp mode. Then deployed on window XP system. Then I got error that mfc120ud.dll is missing. I installed vcredist.exe for vs2013, which fixed the issue. I am able to run my MFC app.
When I encountered a similar problem, first installed the VS 2013 C++ redistributables vcredist_x86.exe and vcredist_x64.exe (https://support.microsoft.com/en-us/help/3138367/update-for-visual-c-2013-and-visual-c-redistributable-package), then I determined what dependencies the file had:
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>dumpbin.exe /dependents "C:\Temp\MyLibrary.dll"
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file C:\Temp\MyLibrary.dll
File Type: DLL
Image has the following dependencies:
mfc120d.dll
MSVCR120D.dll
KERNEL32.dll
USER32.dll
OLEAUT32.dll
mscoree.dll
Image has the following delay load dependencies:
MyLibraryCoreD.dll
Summary
5000 .data
2000 .nep
1000 .pdata
4E000 .rdata
1000 .reloc
1000 .rsrc
10000 .text
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>
Next I searched the registry and it did not find mfc120d.dll, only mfc120.dll and mfc120u.dll (see https://serverfault.com/questions/576831/how-do-i-know-if-a-dll-is-registered), so instead of using the debug version I switched to the release version which uses mfc120.dll and the application worked.