Cython with MinGW-w64

632 views
Skip to first unread message

Stepan Kasal

unread,
Sep 11, 2017, 11:05:16 AM9/11/17
to cython-users
Hello,
I routinely compile cython modules for Anaconda on windows x86-64 with mingw w64, for Python 2.7.

I was not able to do the same with Python 3.x.

In both cases, I build the modules through pyximport.
With --verbose, I was able to see the commands and tweak them.

Using Python 3.4, I was able to link xxxx.pyd using -l msvcr100.dll, but the module then did not load.
How can one debud such a situation?  Can I see exported symbols of a dll somehow?  Can I get
more detailed explanation of the reasons why loading the module failed?

Python 3.6 is probably built with MSVC2015, so there is no direct replacement for msvcNN.dll; can that be fixed somehow?

Thank you in advance for any help.

Stepan Kasal

Martin Bammer

unread,
Sep 13, 2017, 3:09:59 AM9/13/17
to cython-users
Search for mingwpy. You will find a wheel for installation. This works for me. The official mingw64 produces incompatible dlls.

Stepan Kasal

unread,
Sep 13, 2017, 7:26:46 AM9/13/17
to cython-users
Thank you for your answer, I will try it.
Can you tell me what version of Python are you using?

Thanks,
Stepan

Martin Bammer

unread,
Sep 13, 2017, 10:55:13 AM9/13/17
to cython...@googlegroups.com
3.4

--

---
You received this message because you are subscribed to a topic in the Google Groups "cython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cython-users/39ibHNjFr_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stepan Kasal

unread,
Sep 14, 2017, 9:02:52 AM9/14/17
to cython-users
It work for me as well:
Anaconda 2.2.0 64-bit, without package mingw, but with wheel mingwpy installed from
https://anaconda.org/carlkl/mingwpy

Thank you, Martin, for your help.
Stepan

On Wednesday, 13 September 2017 16:55:13 UTC+2, Martin Bammer wrote:
3.4

Denis Akhiyarov

unread,
Sep 18, 2017, 9:46:45 AM9/18/17
to cython-users
FYI mingwpy has no roadmap and no funding for Python 3.5+ due to issues with UCRT in Python 3.5 and 3.6 in MSVC 2015+.
Reply all
Reply to author
Forward
0 new messages