For whatever reason, when I send a friend (non developer) a program that I make in cocos, he can’t run it. I think I’ve pinned the issue to the program being built in win32 when his computer has a 64 bit OS.
I’m wondering how to build cocos in 64 bit so that I can send him my programs. I haven’t really explored cocos’ command line and I’m ignorant to most of what cocos can do, so any help is appreciated.
I’ve included all required dependencies, including all cocos libraries, VCRUNTIME140d, VCRUNTIME, and ucrtbased. Please see below:
I’ve done a bit more research and found that a friend of mine was able to run the program on a windows 7 PC. The SDK being used in the VS project is the windows 7 SDK, and for some reason i cannot change the version to windows 10. Is there something specific I need to do? (As of this post I am editing the topic title)
VCRUNTIME140d.dll is a debug DLL, which is not meant for re-distribution at all. By including all dependencies, do you mean you’ve bundled up all the extra DLLs you found are required (did you use Dependency Walker?). If so, you really shouldn’t be doing this, and you should simply install the required Visual Studio runtime. The 140 version is the VS2015 C++ Runtime, but I think MS now merged VS2015, 2017 and 2019 runtimes into one, which you can find here:
First things first: I built the program in release, I was just never sure which version of VCRUNTIME to include so I put both of them into the folder with the game’s exe, the resources folder and the cocos libraries.
Secondly, the friend that I mentioned in my previous post did not have to download the runtime that you linked. The dll’s I had given them were sufficient, and they were able to run my game perfectly fine.
my version of cocos is : 3.17.1
I am using the latest version of VS community 2017 (15.9.13)
I created the project using an executable called “CocosProjectCleaner.exe”
I am not entirely certain on how this executable works, but when it was done running it had made a visual studio project for me and copied / created a bunch of folders for me
It is an executable that does exactly as I’ve described. If this is the root of the problem, than can someone point me in the right direction when it comes to making a cocos project in visual studio normally? Do I have to use CMake?
Alright well, with that being said, I guess I should create a new cocos project now. I’m guessing I either have to use CMake or the command line? Again im very new to this part of cocos, so please forgive me for asking potentially obvious questions
You really should avoid copying those Microsoft VC++ runtime DLLs into your project, regardless of what advice you may see posted online. The MS VC++ re-distributables are made for this specific purpose, which is what you should be including with your application, and the installer you create can take care of installing it along with your application if required (most of the time it’ll already be installed as a dependency by another app).
Also, I have no idea what CocosProjectCleaner.exe is. What is the purpose of the application?
I have now realized my mistake. The underlined portion of the picture shows that the VS runtime being used was apparently by default set to windows XP. I’ll do some more testing on my friend’s computer and come back with results now that I know this.
That executable was given to me by a friend, and I don’t know the origin
If you add the DLLs into the release folder, and there are issues discovered within the MS DLLs (security issues/incompatibilities etc), then the only way the user gets those updates is if you release a new version of your application. If you install the VS C++ runtime provided by MS, then the user can receive critical updates to it automatically via Windows Update.
I feel like at this point I should change the name of the thread again, so I will do so.
Here’s a picture of the planned deployment folder.
Once again, the error my friend gets is 0xc000007b. The program is now built in the windows 10 SDK in the win32 configuration, my friend’s computer is running a 64 bit version of windows, and I will be working on the aforementioned installer soon.
Is there absolutely anything that I am doing wrong here? (Besides including the VCruntime, I’ll fix that when I make the installer) I tried including the four dll’s mention in the post that @R101 linked earlier, and sadly nothing changed. Any responses are appreciated.
The fact that you are running a Win32 app on Windows 10 64Bit is not an issue, so don’t focus on it. There is something going on with your friend’s PC, because 0xc000007b is a very generic error condition, and it could mean many different things, including corrupt files on that PC, whether it be Windows files, C++ runtime files or even a virus scanner causing the issue.
Any chance you could get your friend to install VS2017 (or VS2019), and then build and run the release version on that PC to try to catch the issue. Read the info here for how to debug a release version.