0
votes

I made a small C++ game in Visual Studio 2015 using the SFML library and it works perfectly fine when I click the '► Local Windows Debugger' button in 'Debug-x86' mode.

My game does not work on anyone else computer because it says the next dll files are missing:

msvcp140.dll
msvcp140d.dll
vcruntime140d.dll
ucrtbased.dll
appcrt140d.dll
desktopcrt140d.dll

I know those files comes from the Visual Studio 2015 Instalation, but for those who do not have VS installed what can I do to fix those problems?

I copied the first 4 dll from my PC C:\Windows\System32 (msvcp140.dll, msvcp140d.dll, vcruntime140d.dll, ucrtbased.dll) on the exe path but couldn't find the last 2 in nowhere. (appcrt140d.dll, desktopcrt140d.dll)

I have no idea how to make an exe aplication with all its dll dependencies.

When I use the 'Release-x86' mode it throws the next error by the way.

Exception thrown at 0x62234AE7 (vcruntime140d.dll) in Timber.exe: 0xC0000005: Access violation reading location 0x00000000.

If there is a handler for this exception, the program may be safely continued.

1
If you have dependencies and if they are not provided by OS, then you have to supply them. - macroland
You need to distribute the Visual Studio C++ Redistributable. Link. Note that only the release DLLs are included in the redistributable. - François Andrieux
Your Release-x86 configuration looks inconsistent. Check linker input settings, and make sure no debug versions of any libs are referenced. - Laszlo
msvcp140d.dll is a debug dll that is part of the CRT. It is not redistributable. Besides violating the Visual Studio licence your program should never require both debug and release dlls. - drescherjm

1 Answers

0
votes

I fixed it by configuring the release mode of the SFML library in the project's properties and by switching to 'Release-x86' mode instead of 'Debug-x86'.

You can read more about how to configure your SFML projects here: https://www.sfml-dev.org/tutorials/2.4/start-vc.php