Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest: Add Solution for "vcruntime140_1.dll Not Found" Error to README #15

Open
creator-hian opened this issue Dec 18, 2024 · 6 comments

Comments

@creator-hian
Copy link

Suggestion: Add Solution for "vcruntime140_1.dll Not Found" Error to README

Hello,

Some users have encountered the error message "vcruntime140_1.dll not found" when trying to run the program. This issue typically arises because the Microsoft Visual C++ Redistributable package is not installed on the system.

While this problem can be easily resolved through a quick Google search, adding a solution to the README file would enhance the user experience by providing immediate assistance.

Proposed Solution:

  1. Install Microsoft Visual C++ Redistributable

    • Download the latest Visual C++ Redistributable package from the Microsoft Official Download Page.
    • Choose the appropriate file for your system: vc_redist.x64.exe for 64-bit or vc_redist.x86.exe for 32-bit.
    • Run the installer and follow the on-screen instructions to complete the installation.
  2. Restart the Program

    • After installing the Redistributable package, try running the program again to ensure that the error has been resolved.
@petoncle
Copy link
Owner

petoncle commented Dec 18, 2024

Hi @creator-hian, thank you again for the report. I had this error in the past, but it was with vcruntime140.dll. I was able to fix it by embedding vcruntime140.dll inside mousemaster.exe, that is why vcruntime140.dll is in the repository. I use a tool called pefrmdllembed to do that, which is also in the repository. This is the first time I hear about vcruntime140_1.dll, maybe we could embed it in mousemaster.exe the same way we did for vcruntime140.dll.
As a test, I've done it manually with version 53 and here is the result:
mousemaster-with-vcruntime140_1.zip

To create this new exe, I used this command to embed the DLL:

./pefrmdllembed/pefrmdllembed.exe -impinj target/mousemaster.exe ./pefrmdllembed/vcruntime140_1.dll target/mousemaster-with-vcruntime140_1.exe

If this is enough to make it work, then I can add it to the automated GitHub build so that vcruntime140_1.dll will always be embedded into the exe. I hope that with this, we don't have to ask users to install Microsoft Visual C++ Redistributable.

Edit: the idea of using pefrmdllembed comes from oracle/graal#1762

@creator-hian
Copy link
Author

Could you provide an exe built to include both VCRUNTIME140.dll and VCRUNTIME140_1.dll?

Previously, the v53 exe was missing VCRUNTIME140_1.dll, while the current exe shows a missing VCRUNTIME140.dll.

v53

v53

v53_with140_1

v53_with140_1

@petoncle
Copy link
Owner

petoncle commented Dec 18, 2024

mousemaster-v53-with-vcruntime140-and-vcruntime140_1.zip

Command used:

./pefrmdllembed/pefrmdllembed.exe -impinj target/mousemaster.exe ./pefrmdllembed/VCRUNTIME140.dll ./pefrmdllembed/vcruntime140_1.dll target/mousemaster-with-vcruntime140-and-vcruntime140_1.exe

@creator-hian
Copy link
Author

"It seems that the command is not working properly. The error message still indicates that VCRUNTIME140.dll is missing, and the code cannot be executed."

The system is configured with only Windows OS installed, without any additional programs such as Visual Studio, VS Code, or similar IDEs

Test System1

    CPU: Ryzen 5800X
    RAM: 64GB
    GPU: RTX 3060
    OS: Windows 11 Pro 23H2
    Application Version: v53

@petoncle
Copy link
Owner

I was using the pefrmdllembed on a .exe that already included VCRUNTIME140.dll. This time, I took the .exe that has no DLL embedded, and I used pefrmdllembed to embed both VCRUNTIME140 and vcruntime140_1. I don't know if it's going to work but here it is:
mousemaster-with-vcruntime140-and-1.zip

@creator-hian
Copy link
Author

The issue of not being able to locate VCRUNTIME140.dll persists. I will continue to check on this problem as new versions are released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants