VCRUNTIME140.dll was not found running cx_freeze executable

Asked

Viewed 125 times

0

A few days ago I developed a Python application and managed an executable using the package cx_freeze with the following code:

from cx_Freeze import setup, Executable 

setup(
    name = "Minha Aplicação",
    version = "",
    description = "",
    executables = [Executable("app.py", base = "Win32GUI")]
)

On my machine, both the application in script .py how the executable works perfectly, but I decided to test on a friend’s machine to be sure. When my friend ran the program, he was presented with the following error:

inserir a descrição da imagem aqui

I searched the internet about and some people said to add to the parameter options the configuration 'include_msvcr': True for the DLL to be added, as in the example below:

setup(
    name = "Keylogger",
    version = "",
    description = "",
    executables = [Executable("keylogger.py", base = "Win32GUI")],
    option = {'build_exe': {'include_msvcr': True}}
    )

Even adding this setting, the program does not work on my friend’s computer and I am almost sure that this error is not generated because of some import that I have done in the program.

What I want to know is what caused this mistake and how can I solve it ?

  • You have to install the C++ Visual Runtime. https://visualstudio.microsoft.com/pt-br/visual-cpp-build-tools/ is in redistributable packages of Visual C++ has to download according to the processor of the machine.

  • @Augustovasques then what is the include_msvcr ? They said this option adds Visual C++ when generating . exe

  • Jean. If I’m not mistaken this option to package Runtime with the application has stopped working since version 5 of cx_freeze not by depreciation but because of a set of bugs that prevent it from packaging Runtime. You’ll have to search the list problems to achieve a self-sufficient executable.

  • I found this answer https://stackoverflow.com/questions/24103105/how-to-link-msvcr100-dll-to-cx-freeze-program I hope you help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.