[英]EMF file(.so) debugging, symbol not found VTable error
In Solaris I have an exe file as per the guideline I need to add a shared library (.so) to extend the functionality. 在Solaris中,我有一个exe文件,我需要添加一个共享库(.so)来扩展功能。 I have created a lthmyplugin.so file and added as described. 我创建了一个lthmyplugin.so文件,并按照描述添加。 Now the utlity run perfectly fine untill it calls my function After calling my function it fails. 现在,运行完全正常,直到它调用我的函数调用我的函数后它失败了。
Questions: 问题:
Also ldd -d lthmyplugin.so show no error except 另外ldd -d lthmyplugin.so除了显示没有错误
symbol not found: __1cIMyPluginG__vtbl_ (./lthmyplugin.so)
symbol not found: __1cIThPluginG__vtbl_ (./lthmyplugin.so)
symbol not found: __1cOThLocalOptionsG__vtbl_ (./lthmyplugin.so)
symbol not found: __1cJThOptionsG__vtbl_ (./lthmyplugin.so)
Can this cause the programme to fail? 这会导致程序失败吗?
fyi, I have not used and any virtual function,constructors or destructors fyi,我没有使用过任何虚函数,构造函数或析构函数
What does this mean symbol not found: _ 1cIThPluginG _vtbl_ ? 这是什么意思没有找到符号:_ 1cIThPluginG _vtbl_?
Thanks, 谢谢,
You can use the nm tool to see the functions exposed by the so file. 您可以使用nm工具查看so文件公开的函数。 You can call: 你可以打电话:
nm -g lthmyplugin.so
... To see what functionality it exposes. ...看看它暴露了什么功能。
Besides that, given you've tagged this as C++, I'm going to take a stab and ask: did you specify a C style calling convention? 除此之外,鉴于你已经将其标记为C ++,我将采取刺激并问:你是否指定了C风格的调用约定? If you didn't, it will mangle the names making them ugly, unreadable and in 99.9% of cases, unfindable. 如果你没有,它会破坏名字,使它们丑陋,不可读,在99.9%的情况下,是不可能的。 You can tell gcc not to mangle your functions by adding __attribute__((cdecl)) , like so: 你可以告诉gcc不要通过添加__attribute __((cdecl))来破坏你的函数,如下所示:
int not_mangled(int some_arg) __attribute__((cdecl))
{
return some_arg * 3;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.