Cython and Blender (32bits and 64bits) problem!

Hi !

I play a bit with Cython on Windows7 and a get this problem:

When a compile with minwg32 ( installed like this: ) this is work with Blender 32bits but not with 64bit. I normal I think.

For that a check to compile cython extension like that: . With Windows SDK C/C++ compiler I be able to compile 32bit and 64bit cython extension and it’s work really fine with externally installed pyhton ! But it’s not work at all with embedded python in blender ( error message about not found library if I remember ).

My setup:
-6Gig of ram
-Windows7 home edition OEM
-Python 3.2.2 32bit and 64bit ( from )
-Official 2.62 Blender release 32bit and 64bit ( from )
-Windows SDK for Windows 7 (GRMSDKX_EN_DVD.iso from Microsoft website)
-MinWG32 (from

If I do a short story: Minwg32 work great but just in 32bit version of Blender. Windows SDK C/C++ Compiler don’t work at all ( 32bit and 64bit) with Blender but works with externally installed python (from python website). Cython website said to not use Winwg64 , for this reason I don’t try it.

Somebody have a idea and already successfuly compiled cython extension for Blender 64bit ?

Thanks !

( error message about not found library if I remember )
Would you be so kind as to be specific on that one?

I bet it is related to manifests. I hate manifests.

EDIT: Are you getting an error like this?
“R6034 The application has made an attempt to load the C runtime library incorrectly”

If so, this is definitely related to manifests. I have confirmed that this error will occur using the default cython build steps (using a, which will embed a manifest. I have also manually built the output c files of a cython build as a DLL in Visual Studio and disabled the embedding of a manifest there. (“project properties->configuration properties->manifest tool->input and output”). That way it can be loaded in release builds. I haven’t found an option to disable embedding of manifests in cython setup tools, but it’s probably there.

Yes , I try to write the exact error message when I can go on my computer! :slight_smile:

Since you’re online, make sure to read my edit.
I wish to highlight the most important part here again:
Fuck manifests

Ok and MinGw don’t did it?

Huummm, I don’t have Visual Studio, just free Windows SDK C/C++ Compiler and it’s a command prompt. I need to find the option in a other way. Again , I’m on my cellphone. Wait to be on my computer to write you the exact error message.

Thanks for the tip

Ok and MinGw don’t did it?

Indeed it doesn’t, however you shouldn’t use use a mingw DLL with a MSVC build either (might lead to random crashes)

Here is the error I got

Popup messages when I import my extension:

Microsoft Visual C++ Runtime Library

Runtime Error! 

Program: D:\Blender3D...\blender.exe

An application has made an attempt to load C runtime library
Please contact the application support team for mor information.

From the python console in Blender:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: DLL load failed: Une routine d’initialisation d’une bibliothèque de liens dynamiques (DLL) a échoué.