Hi everyone -
I am having trouble building a working version of Python with ctypes using the Intel Compiler (11.1). The trouble is, that libffi under the ctypes module does not work properly when interfacing with e.g. OpenGL.
Originally, libffi did not compile using the Intel Compilers as __int128_t
is not defined, and I followed the work around that has been listed several places, namely by defining a new type:
typedef struct { int64_t m[2]; } __int128_t;
This follows a response as given by Intel : http://software.intel.com/en-us/forums/showthread.php?t=56652
The patch then suggests something like this:
typedef struct { int64_t m[2]; } __int128_t;
//and then change where the uint64_t is assigned to this to be:
sse[x].m[0] = *(uint64_t*) v;
sse[x].m[1] = 0;
//and where the uint32_t is assigned to:
sse[x].m[0] = *(uint32_t*) v;
sse[x].m[1] = 0;
Applying the patch, things compile, and ctypes
becomes available for import, however, when interfacing with OpenGL, things do not work. Running PyQt's example program hellogl.py
results in a blank view.
Is there a better, working way of doing this?
Dan;