Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Problem of loading shared library when using xpcom

瀏覽次數:4 次
跳到第一則未讀訊息

Keren Dong

未讀,
2006年10月13日 凌晨3:26:052006/10/13
收件者:dev-tec...@lists.mozilla.org
I need to call a function which is provided by a .so library, but
when running with firefox, it crashed and report:

/libexec/ld-slf.so.1: /usr/X11r6/lib/firefox/components/libtest.so:
Undefined symbol "_Z10getprivkeyPiPPh"

getprivkey() is the function that I need to call.
How to solve this?

Benjamin Smedberg

未讀,
2006年10月13日 上午9:01:462006/10/13
收件者:

What library is getprivkey() supplied by? Are you linking against that
library? Is that function actually exported by the library you think it is?

--BDS

Keren Dong

未讀,
2006年10月13日 上午9:48:582006/10/13
收件者:dev-tec...@lists.mozilla.org
Yes, I'm sure of it.
I have wrote a individual program to test it and it can work fine,
but this is a lib that is written by pure c, is this the problem?

> _______________________________________________
> dev-tech-xpcom mailing list
> dev-tec...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xpcom

--
Best regards,
Keren Dong

Institue of Software, Chinese Academy of Sciences
MSN/Gtalk: drago...@gmail.com
AIM: dragonballs1983


Benjamin Smedberg

未讀,
2006年10月13日 上午10:06:052006/10/13
收件者:
Keren Dong wrote:
> Yes, I'm sure of it.
> I have wrote a individual program to test it and it can work fine, but
> this is a lib that is written by pure c, is this the problem?

So this is a library you are providing? Where do you have the library
installed? This sounds like an error in linkage that you will need to solve.
Tools that may help you find the problem include ldd and nm.

--BDS

0 則新訊息