英特尔编译器和Python/ctypes/libffi

问题描述 投票:0回答:1

我在使用英特尔编译器 (11.1) 构建带有 ctypes 的 Python 工作版本时遇到问题。问题是,ctypes 模块下的 libffi 在与例如接口连接时无法正常工作。 OpenGL。

最初,libffi 没有使用英特尔编译器进行编译,因为

__int128_t
未定义,我遵循了几个地方列出的解决方法,即定义一个新类型:

typedef struct { int64_t m[2]; } __int128_t;

这是英特尔给出的回应:http://software.intel.com/en-us/forums/showthread.php?t=56652

补丁会提出如下建议:

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;

应用补丁,编译,并且

ctypes
可以导入,但是,当与 OpenGL 交互时,事情不起作用。运行 PyQt 的示例程序
hellogl.py
会产生空白视图。

有更好的、有效的方法吗?

python ctypes icc libffi
1个回答
3
投票

我是libffi的作者。 我建议向 [email protected] 发送包含所有这些详细信息的注释。 我还建议在英特尔编译器构建的 libffi 上运行 libffi 测试套件。 请务必将结果发送至 [电子邮件受保护],我们可以帮助解决问题。

© www.soinside.com 2019 - 2024. All rights reserved.