6

我正在使用一个 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 源代码中实现的函数。

4

1 回答 1

0

这意味着您没有链接到足够多的库,或者是因为它没有在 pkgconfig 文件中指出,或者您没有首先引用 pkgconfig 文件。

于 2010-07-09T19:21:19.393 回答