我正在使用一个 C 模块扩展我的 Python 程序,该模块使用 GStreamer 的 GstPhotography 接口。我的 C 模块编译得很好,但是当我尝试从 Python 运行它时,我收到了这个错误:
$python Program.py
Traceback (most recent call last):
File "Program.py", line 10, in <module>
import MyPythonClass
File "/path/MyPythonClass.py", line 19, in <module>
import my_c_module
ImportError: /path/my_c_module.so: undefined symbol: gst_photography_get_type
我不太确定这意味着什么,因为我从不在 my_c_module.cpp 中使用 gst_photography_get_type——它是在 GstPhotography 源代码中实现的函数。