Thanks for your reply. I used $(MOZ_COMPONENTS_LIB) and it removed the errors. But now I get an error saying:
error LNK2001: unresolved external symbol "public: static void const * const nsObsoleteACString::sCanonicalVTable" ([EMAIL PROTECTED]@@2PBXB)
In fact, due to this error (and some others) I was directly linking those two libraries.
Thanks again for your help.
Regards,
Umesh.
----- Original Message ----- From: "Benjamin D. Smedberg" <[EMAIL PROTECTED]>
Newsgroups: netscape.public.mozilla.xpcom
To: <[email protected]>
Sent: Tuesday, April 19, 2005 6:08 PM
Subject: Re: Link errors while building a component
Umesh Bywar wrote:Hi all,
I have added a new component which uses some other components. I am pasting my MakeFile and also the link errors that I am getting. The question I have is why should I get errors belonging to the libraries that I am referring to (i.e. xpcomds_s.lib & string_s.lib)?
You should not be linking directly against xpcomds_s.lib or string_s.lib.
If you want to be compatible with future versions of Firefox (using only frozen APIs), you must use only the frozen XPCOM imports, and link against either
xpcom.dll (xpcom.lib) + xpcomglue_s.lib
or
xpcomglue.lib (requires calling XPCOMGlueStartup)
If you don't care about future compatibility, you can link directly against xpcom_core.dll (which is $(MOZ_COMPONENT_LIBS) in our build system), and you will automatically get access the string and "ds" classes, which are dllexported from xpcom_core.
--BDS
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
