Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem in registering XPCOM component in Firefox 1.5

4 views
Skip to first unread message

sabarinathan

unread,
Dec 29, 2005, 3:00:03 AM12/29/05
to
Hai All,

To make my component compatible with Firefox 1.5, i tried to compile it
against firefox 1.5 Gecko SDK.

I have created a XPCOM Component against Gecko-SDK which was taken
from
http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.8b1/gecko-sdk-i686-pc-linux-gnu-1.8b1.tar.gz
. I have compiled Successfully .

For Registering the component with Firefox 1.5 , I did the following steps
1. Copied my component .so to firefoxInstallationDirectory/components/
2. Copied my xpt file to firefoxInstallationDirectory/components/
3. Executed touch .autoreg
4.Invoked the firefox

While Invoking i am getting the following error message

./firefox-bin: symbol lookup error:
/advent/advent1/srinivasar/firefox/1.5rel/firefox/components/libqecomp_FIREFOX_1.so:
undefined symbol: _Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule

Please let me know how i can resolve this. Please refer me if any docs
related to this problem.

Thanks in advance.


Regards
Sabarinathan.P

Christian Biesinger

unread,
Dec 29, 2005, 8:43:57 AM12/29/05
to
sabarinathan wrote:
> ./firefox-bin: symbol lookup error:
> /advent/advent1/srinivasar/firefox/1.5rel/firefox/components/libqecomp_FIREFOX_1.so:
> undefined symbol: _Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule

You should link to the XPCOM glue. See
http://developer.mozilla.org/en/docs/XPCOM_Glue#Compiling_or_linking_against_XPCOM_headers

sabarinathan

unread,
Dec 30, 2005, 1:00:54 AM12/30/05
to
Hi Christian Biesinger,

Thanks for ur reply.

Now the firefox has been invoked sucessfully but my component is not
getting registered . I found entries of my component only in the xpt.dat
file. In compreg.dat file i didn't see any entries of my component. I
did as per the document that you have sent.
Please let me know how to proceed further.

Thanks & Regards
Sabarinathan


Christian Biesinger wrote:

> _______________________________________________
> Mozilla-xpcom mailing list
> Mozill...@mozilla.org
> http://mail.mozilla.org/listinfo/mozilla-xpcom
>

christopher taylor

unread,
Dec 30, 2005, 1:06:15 AM12/30/05
to
I'm also having a problem with registering my component with firefox
1.5 on linux

i wrote my component for an older release on linux, ported to windows
then installed 1.5 - now with firefox 1.5 it works great on windows
but the component fails to register with the linux build

any suggestions?

chris

sabarinathan

unread,
Dec 30, 2005, 7:26:06 AM12/30/05
to
Hai Christopher,

I have tried to compile my component in Windows. All the files were compiled. While linking i got the following error .
Is there anything i missed please help me.

   Creating library libqecomp_FIREFOX_1.lib and object libqecomp_FIREFOX_1.exp
nsPlayBackUtils.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsCOMPtr_base::assign_from_gs_contractid(class nsGetServiceByContractID,struct nsID const &)" (__imp_?assign_from_gs_contractid@nsCOMPtr_base@@QAEXVnsGetServiceByContractID@@ABUnsID@@@Z)
nsRecorderImpl.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsCOMPtr_base::assign_from_gs_contractid(class nsGetServiceByContractID,struct nsID const &)" (__imp_?assign_from_gs_contractid@nsCOMPtr_base@@QAEXVnsGetServiceByContractID@@ABUnsID@@@Z)
nsPlayBack.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsCOMPtr_base::assign_from_gs_contractid(class nsGetServiceByContractID,struct nsID const &)" (__imp_?assign_from_gs_contractid@nsCOMPtr_base@@QAEXVnsGetServiceByContractID@@ABUnsID@@@Z)
nsValidator.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicIncrement
nsRecorderImpl.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
nsPlayBack.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
nsValidator.obj : error LNK2001: unresolved external symbol __imp__PR_AtomicDecrement
nsRecorderImpl.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsCOMPtr_base::assign_from_gs_contractid_with_error(class nsGetServiceByContractIDWithError const &,struct nsID const &)" (__imp_?assign_from_gs_contractid_with_error@nsCOMPtr_base@@QAEXABVnsGetServiceByContractIDWithError@@ABUnsID@@@Z)
nsQEngineImpl.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsCOMPtr_base::assign_from_gs_contractid_with_error(class nsGetServiceByContractIDWithError const &,struct nsID const &)" (__imp_?assign_from_gs_contractid_with_error@nsCOMPtr_base@@QAEXABVnsGetServiceByContractIDWithError@@ABUnsID@@@Z)
nsPlayBack.obj : error LNK2001: unresolved external symbol __imp__PR_Sleep
nsQEngineImpl.obj : error LNK2001: unresolved external symbol __imp__PR_Sleep
nsPlayBack.obj : error LNK2001: unresolved external symbol __imp__PR_MillisecondsToInterval
libqecomp_FIREFOX_1.dll : fatal error LNK1120: 8 unresolved externals


Regards
Sabarinathan.

sabarinathan

unread,
Jan 2, 2006, 12:58:49 AM1/2/06
to
Hai christopher,

Thanks for reply.
I have already linked my component to xpcom.lib ,xpcomglue_s.lib,
nspr4.lib, plds4.lib, plc4.lib , embed_base_s.lib and gnu libraries.
For compiling i have used cl.exe .

I have used gecko-sdk-i586-pc-msvc-1.8b1.zip . Is this correct gecko-sdk
for firefox1.5.
Please guide me. Is there any docs please refer me.

Thanks and regards,
Sabarinathan.

christopher taylor wrote:

>looks like you aren't linking to the correct xpcom library
>
>i link to xpcom.lib and xpcomglue_s.lib nspr4.lib plds4.lib plc4.lib
>embed_base_s.lib and i've some gnu *.libs i link to.
>
>keep in mind i'm using the CL.EXE compiler (Free one) from microsoft
>and i'm entering all this by the command prompt (by hand)

0 new messages