Benjamin Smedberg wrote:
> How are you compiling the component? Components will only work with multiple
> versions of the application if they are linked using the XPCOM glue, use
> nsEmbedString, and are careful to use only frozen APIs.
>
> It is very common to have binary components for Firefox 1.5. I don't know of
> any examples offhand of components that work in both Firefox 1.0.x and
> Firefox 1.5, though it should be possible.
>
> --BDS

This is my component "heading":

#define MOZILLA_STRICT_API
//#define DO_DEBUG

#include <nsIGenericFactory.h>
#include <nsCOMPtr.h>
#include <nsXPCOM.h>
#include <nsIServiceManager.h>
#include <nsICategoryManager.h>
#include <nsEmbedString.h>
#include <nsMemory.h>
#ifdef DO_DEBUG
        #include <nsIPromptService.h>
#endif
#include <nsIComponentRegistrar.h>
#include "nsprint.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

and I'm linking against xpcom.lib and xpcomglue_s.lib

I really don't care if the component works in both versions, I can have
two components, one for each. My real problem is I can't make a
component that works in FF 1.5 (not even an empty one).
I'm compiling in Windows (with Visual C++ Express 2005 - version 8 I
think) and on Linux. None of them works. I've try with SDK 1.7, 1.8 and
"latest" (don't say wich version it is) but only on Windows, on Linux
I've try only with SDK 1.7.

A very odd thing is that on Linux, after intalling the component,
firefox doesn't start, just gives you a waiting cursor for a while an
closes (without showing any windows), you have to start it again and
then it actually starts (with the component not working).

Thanks.
David.

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to