Arunan Bala wrote:
Doug Turner wrote: > I will assume that your xpi file works correctly.
It puts the DLL in C:\Program Files\mozilla.org\Mozilla\components, which I believe is correct since it gets registered and shows the error dialogue box.
> What is your code linking against? Is your code using any of the > do_Get* functions? Just a guess, but do_GetService(CONTRACT_ID) boils > down into a class that isnt frozen or part of the GLUE library. So, if > you are only linking to the xpcom GLUE library and you are using these > do_Get functions, this link error woulf be expected.
do_GetService() was the right guess (yaay!) and resolved the previous
error. However, I now get another error dialogue:
"The procedure entry point [EMAIL PROTECTED]@@QAEXVnsQueryInterface@@ABUnsID@@@Z could not be located in the dynamic link library xpcom.dll."
> If you are linking against the copy of XPCOM library, you should have > this symbol resolved. Note that you might have to have different > versions of your extensions for different version of what you link > against. For maximum reusable, stick to frozen interfaces and files > (see nsXPCOM.h, for frozen C APIs' to the commonly used interfaces.)
OK, this is linked against xpcom.lib, and I assume the glue library is
xpcomglue.lib (from http://www.mozilla.org/projects/xpcom/book/cxc/html/appA.html#1001796
and the name :) ).
I see the reason for doing this was that the code is set to build in mozilla/extensions/wbmp and the makefile is a modified version of one of the ones in the tree rather than one of the platform specific ones described in "Creating XPCOM Components" Appendix A. When I switch
REQUIRES = xpcom \
to
REQUIRES = xpcomglue \
in an effort to link against xpcomglue.lib, it fails to compile as there is no ../../dist/include/xpcomglue directory.
So could somebody tell me:
1) Is the second error "The procedure entry point [EMAIL PROTECTED]@@QAEXVnsQueryInterface@ ..." due to compiling and linking against current CVS code and putting the result in a 1.6 build?
If you build a component against the 1.7 source tree, then it can only be used in 1.7 or later releases. If you want to build a component that works in 1.6 and later, then you need to compile your component against the 1.6 SDK.
2) Is mozilla/extensions the right place to be building this, or should this built separately using the Gecko SDK?
You should use the Gecko SDK instead. That way, it will be very clear at compilation time if you are attempting to use non-frozen functions or interfaces.
-Darin _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
