C++ – The program can’t start because mfc120ud.dll is missing from your computer

cdllvisual studio

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.

I've searched the mfc120ud.dll from the net but without any result. I've copied/pasted this dll file from the computer on which I've developed that app onto the system32 of the other computer, doing that implies:

C:\Users\u\System32\mfc120ud.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.

Knowing that the computer on which I'm developing is a 64-bits one and the other one is 32-bits, and that I've copied/pasted the mfc120ud.dll version from System32, how do I to fix this issue?

Best Answer

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:

  1. Build your project for release. This will link against the release versions of any runtime DLLs.
  2. Install the MSVC and MFC redistributable dependencies on any machine on which you plan to run your program. An alternative is to install the runtime DLLs in the same directory as your executable.

I've copied/pasted the mfc120ud.dll version from System32

You are not allowed to do that. Retrace your steps and undo that.