y****e 发帖数: 23939 | 1 I need wrap a project into Python. All C++ classes are built as a shared
library libGORGON.so. The boost.python wrapper file is built as
libpyGORGON.so. But when I try to import libpyGORGON in Python prompt. I got
error:
Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat
4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for
more information.
>>> import libpyGORGON.so
Traceback (most recent call last):
File "", line 1, in ?
ImportError: /data2/Gorgo | t****t 发帖数: 6806 | 2 > c++filt _ZTIN8wustl_mm13Visualization8RendererE
typeinfo for wustl_mm::Visualization::Renderer
so this one is missing.
when you say you have _ZTIN8wustl_mm13Visualization8RendererE (by using nm
to check), what symbol does it have? You sure it's not U?
PS how did your last question go? care to update?
got
【在 y****e 的大作中提到】 : I need wrap a project into Python. All C++ classes are built as a shared : library libGORGON.so. The boost.python wrapper file is built as : libpyGORGON.so. But when I try to import libpyGORGON in Python prompt. I got : error: : Python 2.4.4 (#1, Oct 23 2006, 13:58:18) [GCC 4.1.1 20061011 (Red Hat : 4.1.1-30)] on linux2 Type "help", "copyright", "credits" or "license" for : more information. : >>> import libpyGORGON.so : Traceback (most recent call last): : File "", line 1, in ?
| y****e 发帖数: 23939 | 3 噢,nm的结果果然是U:
U _ZTIN8wustl_mm13Visualization8RendererE
U的意思是“This symbol is undefined”。到底是怎么回事呢?
如果我用nm libGORGON.so | grep blahblah
就会什么也不返回,返回U是指有declaration,没有definition吗?
非常感谢你,thrust,最近我的很多问题都能从你那里得到答案。
【在 t****t 的大作中提到】 : > c++filt _ZTIN8wustl_mm13Visualization8RendererE : typeinfo for wustl_mm::Visualization::Renderer : so this one is missing. : when you say you have _ZTIN8wustl_mm13Visualization8RendererE (by using nm : to check), what symbol does it have? You sure it's not U? : PS how did your last question go? care to update? : : got
| t****t 发帖数: 6806 | 4
that's right. it has to be defined somewhere else.
Please show your appreciation by letting us know, whether and how
your problem is solved.
【在 y****e 的大作中提到】 : 噢,nm的结果果然是U: : U _ZTIN8wustl_mm13Visualization8RendererE : U的意思是“This symbol is undefined”。到底是怎么回事呢? : 如果我用nm libGORGON.so | grep blahblah : 就会什么也不返回,返回U是指有declaration,没有definition吗? : 非常感谢你,thrust,最近我的很多问题都能从你那里得到答案。
| y****e 发帖数: 23939 | 5 问题解决了,Renderer是一个base class,定义了一个virtual destructor,
virtual ~Renderer();
但是没有define。改成:
virtual ~Renderer() {}
就可以了。
再次向thrust表示感谢。 |
|