python_example icon indicating copy to clipboard operation
python_example copied to clipboard

Building with MinGW

Open rafael-fuente opened this issue 5 years ago • 1 comments

I tried to run setup.py with MinGW instead of Visual Studio MSVC python setup.py build --compiler=mingw32

I get the following error: ValueError: Unknown MS Compiler version 1916

Is there any way to make it work with MinGW?

Note that a manual compilation with MinGW works perfectly running:

g++ -static -shared -std=c++11 -DMS_WIN64 -fPIC -I C:\...\Python\Python38\Lib\site-packages\pybind11\include -I C:\ ... \Python\Python38\include -L C:\ ... \Python\Python38\libs src\main.cpp -o python_example.pyd -lPython38

but I cannot manage to make it to work with setuptools.

rafael-fuente avatar Jun 10 '20 14:06 rafael-fuente

Is this still a problem with the latest versions? Eventually I hope someone will show me how to setup mingw on GitHub Actions, and then we can test it.

henryiii avatar Apr 21 '21 22:04 henryiii