VCRUNTIME140D.dll not found for Windows release

VCRUNTIME140D.dll not found for Windows release
0

Hi! I programmed a game using cocos2dx on linux but have been unsuccessful in porting it to Windows. After a few other errors and scouring the forums for solutions I managed to get it running on my computer just fine but when I sent it to some friends the error “VCRUNTIME140D.dll not found” popped up for each of them. From doing more googling it seems like this error means the project is being compiled in debug mode even though I set the mode to release. After even more googling it turns out that some of the provided dlls are precompiled as debug (specifically websockets.dll). The solutions for solving this weren’t really clear though, especially because I’m pretty new to CMake. I’ve been trying to get it working for a week now so any help would be greatly appreciated.

You need the Visual Studio redistribution along with your app. There are topics covering this already on these forums.

1 Like

Yeah I’m fully aware of that. I tested on my other computer which has Visual Studio Redistributable 2010 through 2017 and the same problem happens. I think the issue here is that something is being compiled in Debug mode (hence the “D”) in VCRUNTIME140D as per this thread here. I already specified the mode to be “release” on the cocos2dx command tool and I even edited each vcxproj file to be “release” instead of “debug” but this still happens :sweat_smile:

I’m not sure then. This is the process many developers use and it works. I’d say There was no need to change debug to release. Just create a new release target to ensure proper settings.

Run cocos new and try to run that project on the machine with the redists installed. Does it work?

Try to see if this tool can help you find which of your files has a dependency on VCRUNTIME14D:

Dependecy Walker

1 Like

Just tried making a completely new project and the same thing happens. I think my problem is similar to this one but I still can’t figure out how to compile the dlls myself

Looks like its definitely from websockets.dll

WEBSOCKETSDLL

That’s not good. If you don’t need websockets, then perhaps you can remove the reference from your executable. If you do need it, then it seems that you’ll have to compile it from source:

Which includes compiling the uv library from source too (the real culprit here it seems):

How do I go about removing the reference from my executable exactly? Because I’m not using websockets atm

@R101Can you compile these deps on Windows? If not, perhaps I need to make a new Windows VM and try this process out to create better documentation.

@slackmoehrle I’ll give it a shot and let you know.

@LaudemPax If you want to go down the route of disabling websockets, then it looks like you’ll have to edit the source code and build files in the cocos folder. Just do a search for “websockets” and you’ll see what I mean.

@LaudemPax See if this release build of the DLL files work for you. Check them with dependency walker again to make sure nothing is missing.

WebsocketsRelease.zip (849.0 KB)

2 Likes

Wow it works fine now. Thank you both so much, you two have been really helpful :grin:. Did you compile these yourself btw?

Glad they work! I’ll pass on the changes I had to make to the cocos2d/cocos2d-x-external files to get them to compile, so hopefully one of the maintainers of the github repo can merge them in.

3 Likes