1

I want to test out Cython with Python. When I run python setup.py build_ext --compiler=mingw32 (I use GCC from MSYS2 on Windows) it tells me cannot find -lmsvcr140 (MSVCR140.dll). From this answer, it seems that this file missing since Visual C++2015 Redistributables introduced and replaced by VCRuntime140.dll. My question is how do I tell Cython to use VCRuntime.dll instead?

Akhmad Zaki
  • 419
  • 7
  • 23

1 Answers1

0

In my case, I update MinGW into MinGW-w64 (prooved to be critical), and edit the code snippet in cygwinccompiler.py:

    elif int(msc_ver) >= 1900:
        # VS2015 / MSVC 14.0
        # return ['msvcr140']
        return ['vcruntime140']

then put vcruntime140.dll into /path/to/mingw-w64/lib, then solve the problem.

X.Angus
  • 1
  • 3