使用嵌入式c++导入pygame失败

import pygame fails with embedded c++

本文关键字:pygame 失败 导入 c++ 嵌入式      更新时间:2023-10-16

嗨,伙计们,这是的问题

我在windows 7 32 bin中安装了python 2.7和pygame 1.9当我使用pygame和python interper时,没有问题,它工作得很好

然后对于线路

import pygame

控制台或调用python和文件名没有问题

但我想把它嵌入到用mingw32编译的c++项目中。当我导入其他包,如cv2或numpy没有问题,但在pygame的情况下,我有这个错误

ImportError: DLL load failed: The specified module could not be found.

有人知道问题出在哪里吗?

非常感谢

经过大量的谷歌搜索,我已经解决了。问题出在msi格式的pygame包上。

我卸载了它,我已经安装了轮子和包

pygame‑1.9.2a0‑cp27‑none‑win_amd64.whl

从页面http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

这对我很有效。在msi包和minggw32编译的情况下,出现了一些dll丢失的问题

非常感谢我们

:)