2
votes

I wrote a programm with Visual Studio, that i wanted to share with some friends. But when taking the complete folder containing the debug folder containing my .exe file and sending it to friends it throws 3 errors:
missing vcruntime140.dll
missing MSVCP140D.dll
missing urctbased.dll
(the order is probably not correct) We tried to reinstall/update Microsoft Visual C++ Redistributable 2017 x64 on this page, but without any positive results.
Might this be a problem, that I'm using the SDL2 library? I copied the SDL2.lib into their Syswow64 folder and system32 folder, which removed that specific .dll error, but made the others first appear.

1
Choose the option to "statically link the C++ runtime libraries". Then there will be no dependence on redistributable components. Also, ship a release build to your friends. - Bathsheba
@Bathsheba Statically linking might be a solution, but I'd rather not blow up the size of my programm, if there's another solution. Is it possible the error exists exclusivly due to not being a release build? - a_familiar_wolf
DLLS ending ....D.dll are debug versions and should not (can not) be re-distributed. As a side note putting DLLs into system directories should have been stop before Windows XP. Put them into your application folder and/or run the redist installation package. What happens if another app tries to install/use a diffent version of SDL2 ? - Richard Critten
Quite possibly - although you can statically link the debug runtime too. - Bathsheba
In addition to Richard Critten's comment: build your project in Release configuration for using on another computers. - Alex F

1 Answers

2
votes

Choosing Realese option before building project and then sending the whole Release folder to your friends should solve this problem.