I made a program in Visual Studio 2010 on Windows 7 64-bit. When I try to run it on Windows XP 32-bit I got message that msvcr100.dll is missing. When I try to copy that file from Win7 to WInXP I got message that msvcr100.dll is wrong. How to set building in VS so msvcr100.dll would not be necessary?
First you need to make sure you're building a 32 bit executable - 64 bit ones won't run on 32 bit Windows.
Then you can either...
- Ship the 32 bit redistributables with your application.
- Remove the runtime dependency altogether and link statically to the C++ runtimes. To do this, set
Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library
toMulti-threaded (/MT)
.
Linking the runtime libraries statically should help. Go to Project Options -> C/C++ -> Code Generation -> Runtime Library and change the value to Multithreaded or Multithreaded Debug and recompile. This way your application shouldn't depend on the runtime DLLs.
Also don't forget to build a 32bit executable.
The answers above helped me along, but I was still getting the error:
fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds
So to help other who may have, like me, spent way too much time stumbling around in search of a clear solution, I'd like to add the bit of information that solved this issue for me. As it turns out, my project had the wrong "Use of MFC" setting to make use of the answer above.
To put it in clear terms:
Open up the project properties (alt-F7 or Project-menu -> [My Project] Properties) and go to Project -> Properties -> Configuration Properties
If General -> Use of MFC
is set to Use MFC in a Static Library
you must set
C/C++ -> Code Generation -> Runtime Library
to either Multi-threaded Debug (/MTd)
or Multi-threaded (/MT)
and if
General -> Use of MFC
is set to Use MFC in a Shared DLL
you must set
C/C++ -> Code Generation -> Runtime Library
to either Multi-threaded DLL (/MD)
or Multi-threaded Debug DLL
I got this answer from the Microsoft community answers website and all credit should go to David Wilkinson.
The keyword here is "redistributable" since this error message may occur when attempting to run a .exe that was not developed on the end-user's PC.
The following is a good (and trusted) source to download redistributables without having to download the entire VC++ package or patch:
https://visualstudio.microsoft.com/vs/older-downloads/#microsoft-build-tools-2015-update-3
In my case I needed the "Visual Studio 2010 VC++ Redistributable" even though we are in year 2022.
You need to download the x86 version from the official website: https://www.microsoft.com/en-us/download/details.aspx?id=26999 (if link no longer work google "Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update") -> choose x86, not x64 as you need the 32 bits dll.
Step 1.: Go to this website dll-files.com. enter image description here
dll-files.com is a great repository of Windows DLL files and has almost all the DLL files that are existent on Windows.
Step 2. Now type there your DLL error in the search window of the website.
Step 3. DLL-Files.com will immediately list out the zip file containing that particular DLL file. Download this zip file to your computer and extract it. The extracted folder will contain the DLL error file.
Step 4. Copy the download DLL file (Only that file) and paste this file in your default system folder based on your operating systems below. C:WindowsSystem (Windows 95/98/Me) C:WINNT\System32 (Windows NT/2000) C:\Windows\System32 (Windows XP, Vista, Windows 7/Windows 8.1/Windows 10)
Windows will ask you whether you want to replace the existing DLL file with the new one. Say yes and let Windows copy the file. Restart your computer and voila, you can now run the game/app that was not opening and giving the DLL error, easily.
There are many other websites which will give you DLL files that you want
© 2022 - 2024 — McMap. All rights reserved.