I am creating a game playable on windows with cocos2d-x3.17.
In Visual Studio 2017, I set properties → c / c ++ → Code Generation-> Runtime Library to Multi-threaded DLL (/ MD) and built with Release configuration.
When I run the exe file on the pc I built it, I was able to play the game.
However, when I move Release.win32 folder to another pc and tried to execute it, I got errors that MSVCP140.dll and VCRUNTIME140.dll are missing, and I failed to execute.
Thank you for your reply.
Finally I installed all of VC++ redist. 2010, 2012, 2015, 2017.
However, I still get a message that VCRUNTIME140D.dll and ucrtbased.dll are missing and I cannot start the game.
@noprops I remembered that someone else had a similar issue, and it turned out to be one of the libraries provided with cocos2d-x not having a release DLL. If you searched the forum for “VCRUNTIME14D.DLL” you would have seen the post.
That is never a good idea. Firstly, there’s the Microsoft licensing terms, and files like “VCRUNTIME14D.DLL” are debug binaries, which are not meant to be redistributed with any application. Secondly, you wouldn’t want to download them from just anywhere on “the internet”, because you won’t know if they have been compromised in some way, so you would be putting users of your application at risk. If you really must use the debug version of the DLLs, then copy them from your own PC, since they should be there if you have the relevant version of Visual Studio installed.
Alternatively, you could just do what makes more sense, and that is to address the actual cause of the problem, rather than trying to apply a band-aid solution to it. I guess the same advice applies to everything in life, so why not do it here too.