Compiling XPCOM with Gecko 1.9

I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2), 
with Gecko 1.9b2, so that the XPCOM will work with Firefox 3.  The Gecko SDK 
I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip.  I have 
re-created the header using the xpidl.exe that comes from the above 
download.  When I compile, using the same parameters as when I compiled with 
Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp:

1>.\nsSpeakItModule.cpp(21) : error C2144: syntax error : 'int' should be 
preceded by ';'

1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

1>.\nsSpeakItModule.cpp(21) : error C2146: syntax error : missing ';' before 
identifier 'components'

1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

1>.\nsSpeakItModule.cpp(23) : error C2440: 'initializing' : cannot convert 
from 'const char [30]' to 'int'

1> There is no context in which this conversion is possible

1>.\nsSpeakItModule.cpp(24) : error C2078: too many initializers

1>.\nsSpeakItModule.cpp(30) : error C2275: 'nsSpeakItImpl' : illegal use of 
this type as an expression

1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
declaration of 'nsSpeakItImpl'

1>.\nsSpeakItModule.cpp(30) : error C3861: 'NS_CI_INTERFACE_GETTER_NAME': 
identifier not found

1>.\nsSpeakItModule.cpp(32) : error C2275: 'nsSpeakItImpl' : illegal use of 
this type as an expression

1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
declaration of 'nsSpeakItImpl'

1>.\nsSpeakItModule.cpp(32) : error C3861: 'NS_CLASSINFO_NAME': identifier 
not found

1>.\nsSpeakItModule.cpp(35) : error C2440: 'initializing' : cannot convert 
from 'int [1]' to 'const nsModuleComponentInfo *'

1> Types pointed to are unrelated; conversion requires reinterpret_cast, 
C-style cast or function-style cast

The relevant portion of nsSpeakItModule.cpp is:

include "nsIGenericFactory.h"

#include "nsSpeakIt.h"

NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpeakItImpl)

static NS_METHOD nsSpeakItRegistrationProc(nsIComponentManager *aCompMgr,

nsIFile *aPath,

const char *registryLocation,

const char *componentType,

const nsModuleComponentInfo *info)

{

return NS_OK;

}

static NS_METHOD nsSpeakItUnregistrationProc(nsIComponentManager *aCompMgr,

nsIFile *aPath,

const char *registryLocation,

const nsModuleComponentInfo *info)

{

return NS_OK;

}

// For each class that wishes to support nsIClassInfo, add a line like this

NS_DECL_CLASSINFO(nsSpeakItImpl)

static nsModuleComponentInfo components[ ] =      //LINE 21

{

{ "A Component Which Speaks Text", // a message to display when component is 
loaded

NS_SPEAKIT_CID, // our UUID

NS_SPEAKIT_CONTRACTID, // our human readable PROGID or CLSID

nsSpeakItImplConstructor,

nsSpeakItRegistrationProc /* NULL if you dont need one */,

nsSpeakItUnregistrationProc /* NULL if you dont need one */,

NULL /* no factory destructor */,

NS_CI_INTERFACE_GETTER_NAME(nsSpeakItImpl),

NULL /* no language helper */,

&NS_CLASSINFO_NAME(nsSpeakItImpl)

}

};

NS_IMPL_NSGETMODULE(nsSpeakItModule, components)  //LINE 35


Thanks.

Susan 


0
Susan
1/15/2008 3:08:25 PM
mozilla.dev.tech.xpcom 1345 articles. 0 followers. Post Follow

21 Replies
808 Views

Similar Articles

[PageSpeed] 5

MSVC 6 will not work with Gecko 1.9

See http://developer.mozilla.org/en/docs/Build_Documentation

-- 
~Justin Wood (Callek)

Susan Crayne wrote:
> I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2), 
> with Gecko 1.9b2, so that the XPCOM will work with Firefox 3.  The Gecko SDK 
> I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip.  I have 
> re-created the header using the xpidl.exe that comes from the above 
> download.  When I compile, using the same parameters as when I compiled with 
> Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp:
> 
> 1>.\nsSpeakItModule.cpp(21) : error C2144: syntax error : 'int' should be 
> preceded by ';'
> 
> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
> assumed. Note: C++ does not support default-int
> 
> 1>.\nsSpeakItModule.cpp(21) : error C2146: syntax error : missing ';' before 
> identifier 'components'
> 
> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
> assumed. Note: C++ does not support default-int
> 
> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
> assumed. Note: C++ does not support default-int
> 
> 1>.\nsSpeakItModule.cpp(23) : error C2440: 'initializing' : cannot convert 
> from 'const char [30]' to 'int'
> 
> 1> There is no context in which this conversion is possible
> 
> 1>.\nsSpeakItModule.cpp(24) : error C2078: too many initializers
> 
> 1>.\nsSpeakItModule.cpp(30) : error C2275: 'nsSpeakItImpl' : illegal use of 
> this type as an expression
> 
> 1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
> declaration of 'nsSpeakItImpl'
> 
> 1>.\nsSpeakItModule.cpp(30) : error C3861: 'NS_CI_INTERFACE_GETTER_NAME': 
> identifier not found
> 
> 1>.\nsSpeakItModule.cpp(32) : error C2275: 'nsSpeakItImpl' : illegal use of 
> this type as an expression
> 
> 1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
> declaration of 'nsSpeakItImpl'
> 
> 1>.\nsSpeakItModule.cpp(32) : error C3861: 'NS_CLASSINFO_NAME': identifier 
> not found
> 
> 1>.\nsSpeakItModule.cpp(35) : error C2440: 'initializing' : cannot convert 
> from 'int [1]' to 'const nsModuleComponentInfo *'
> 
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, 
> C-style cast or function-style cast
> 
> The relevant portion of nsSpeakItModule.cpp is:
> 
> include "nsIGenericFactory.h"
> 
> #include "nsSpeakIt.h"
> 
> NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpeakItImpl)
> 
> static NS_METHOD nsSpeakItRegistrationProc(nsIComponentManager *aCompMgr,
> 
> nsIFile *aPath,
> 
> const char *registryLocation,
> 
> const char *componentType,
> 
> const nsModuleComponentInfo *info)
> 
> {
> 
> return NS_OK;
> 
> }
> 
> static NS_METHOD nsSpeakItUnregistrationProc(nsIComponentManager *aCompMgr,
> 
> nsIFile *aPath,
> 
> const char *registryLocation,
> 
> const nsModuleComponentInfo *info)
> 
> {
> 
> return NS_OK;
> 
> }
> 
> // For each class that wishes to support nsIClassInfo, add a line like this
> 
> NS_DECL_CLASSINFO(nsSpeakItImpl)
> 
> static nsModuleComponentInfo components[ ] =      //LINE 21
> 
> {
> 
> { "A Component Which Speaks Text", // a message to display when component is 
> loaded
> 
> NS_SPEAKIT_CID, // our UUID
> 
> NS_SPEAKIT_CONTRACTID, // our human readable PROGID or CLSID
> 
> nsSpeakItImplConstructor,
> 
> nsSpeakItRegistrationProc /* NULL if you dont need one */,
> 
> nsSpeakItUnregistrationProc /* NULL if you dont need one */,
> 
> NULL /* no factory destructor */,
> 
> NS_CI_INTERFACE_GETTER_NAME(nsSpeakItImpl),
> 
> NULL /* no language helper */,
> 
> &NS_CLASSINFO_NAME(nsSpeakItImpl)
> 
> }
> 
> };
> 
> NS_IMPL_NSGETMODULE(nsSpeakItModule, components)  //LINE 35
> 
> 
> Thanks.
> 
> Susan 
> 
> 
0
Justin
1/15/2008 5:59:15 PM
I was compiling with Visual C++ 2005 (VC8), which is the "official" version 
of the compiler according to the website you mentioned. Then I downloaded 
Visual C++ 2008 (VC9), which is also a supported version, and got the exact 
same result -- 12 errors.

"Justin Wood (Callek)" <Callek@gmail.com> wrote in message 
news:ZaSdnVDPOq5kbhHanZ2dnUVZ_jKdnZ2d@mozilla.org...
> MSVC 6 will not work with Gecko 1.9
>
> See http://developer.mozilla.org/en/docs/Build_Documentation
>
> -- 
> ~Justin Wood (Callek)
>
> Susan Crayne wrote:
>> I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2), 
>> with Gecko 1.9b2, so that the XPCOM will work with Firefox 3.  The Gecko 
>> SDK I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip.  I have 
>> re-created the header using the xpidl.exe that comes from the above 
>> download.  When I compile, using the same parameters as when I compiled 
>> with Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp:
>>
>> 1>.\nsSpeakItModule.cpp(21) : error C2144: syntax error : 'int' should be 
>> preceded by ';'
>>
>> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
>> assumed. Note: C++ does not support default-int
>>
>> 1>.\nsSpeakItModule.cpp(21) : error C2146: syntax error : missing ';' 
>> before identifier 'components'
>>
>> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
>> assumed. Note: C++ does not support default-int
>>
>> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
>> assumed. Note: C++ does not support default-int
>>
>> 1>.\nsSpeakItModule.cpp(23) : error C2440: 'initializing' : cannot 
>> convert from 'const char [30]' to 'int'
>>
>> 1> There is no context in which this conversion is possible
>>
>> 1>.\nsSpeakItModule.cpp(24) : error C2078: too many initializers
>>
>> 1>.\nsSpeakItModule.cpp(30) : error C2275: 'nsSpeakItImpl' : illegal use 
>> of this type as an expression
>>
>> 1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
>> declaration of 'nsSpeakItImpl'
>>
>> 1>.\nsSpeakItModule.cpp(30) : error C3861: 'NS_CI_INTERFACE_GETTER_NAME': 
>> identifier not found
>>
>> 1>.\nsSpeakItModule.cpp(32) : error C2275: 'nsSpeakItImpl' : illegal use 
>> of this type as an expression
>>
>> 1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(21) : see 
>> declaration of 'nsSpeakItImpl'
>>
>> 1>.\nsSpeakItModule.cpp(32) : error C3861: 'NS_CLASSINFO_NAME': 
>> identifier not found
>>
>> 1>.\nsSpeakItModule.cpp(35) : error C2440: 'initializing' : cannot 
>> convert from 'int [1]' to 'const nsModuleComponentInfo *'
>>
>> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, 
>> C-style cast or function-style cast
>>
>> The relevant portion of nsSpeakItModule.cpp is:
>>
>> include "nsIGenericFactory.h"
>>
>> #include "nsSpeakIt.h"
>>
>> NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpeakItImpl)
>>
>> static NS_METHOD nsSpeakItRegistrationProc(nsIComponentManager *aCompMgr,
>>
>> nsIFile *aPath,
>>
>> const char *registryLocation,
>>
>> const char *componentType,
>>
>> const nsModuleComponentInfo *info)
>>
>> {
>>
>> return NS_OK;
>>
>> }
>>
>> static NS_METHOD nsSpeakItUnregistrationProc(nsIComponentManager 
>> *aCompMgr,
>>
>> nsIFile *aPath,
>>
>> const char *registryLocation,
>>
>> const nsModuleComponentInfo *info)
>>
>> {
>>
>> return NS_OK;
>>
>> }
>>
>> // For each class that wishes to support nsIClassInfo, add a line like 
>> this
>>
>> NS_DECL_CLASSINFO(nsSpeakItImpl)
>>
>> static nsModuleComponentInfo components[ ] =      //LINE 21
>>
>> {
>>
>> { "A Component Which Speaks Text", // a message to display when component 
>> is loaded
>>
>> NS_SPEAKIT_CID, // our UUID
>>
>> NS_SPEAKIT_CONTRACTID, // our human readable PROGID or CLSID
>>
>> nsSpeakItImplConstructor,
>>
>> nsSpeakItRegistrationProc /* NULL if you dont need one */,
>>
>> nsSpeakItUnregistrationProc /* NULL if you dont need one */,
>>
>> NULL /* no factory destructor */,
>>
>> NS_CI_INTERFACE_GETTER_NAME(nsSpeakItImpl),
>>
>> NULL /* no language helper */,
>>
>> &NS_CLASSINFO_NAME(nsSpeakItImpl)
>>
>> }
>>
>> };
>>
>> NS_IMPL_NSGETMODULE(nsSpeakItModule, components)  //LINE 35
>>
>>
>> Thanks.
>>
>> Susan 


0
Susan
1/15/2008 7:29:59 PM
Susan Crayne wrote:
> I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2), 
> with Gecko 1.9b2, so that the XPCOM will work with Firefox 3.  The Gecko SDK 
> I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip.  I have 
> re-created the header using the xpidl.exe that comes from the above 
> download.  When I compile, using the same parameters as when I compiled with 
> Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp:
> 
> 1>.\nsSpeakItModule.cpp(21) : error C2144: syntax error : 'int' should be 
> preceded by ';'
> 
> 1>.\nsSpeakItModule.cpp(21) : error C4430: missing type specifier - int 
> assumed. Note: C++ does not support default-int
> 
> 1>.\nsSpeakItModule.cpp(21) : error C2146: syntax error : missing ';' before 
> identifier 'components'

<snip>
> 
> // For each class that wishes to support nsIClassInfo, add a line like this
> 
> NS_DECL_CLASSINFO(nsSpeakItImpl)
> 
> static nsModuleComponentInfo components[ ] =      //LINE 21
> 
> {
> 
Can you build the preprocessed output (cl -P)? That should be useful in 
figure out what the compiler is actually doing.  Of course, that will be 
very large and you would need to search for the relevant text :)

It sort of sounds like it's not seeing nsIGenericFactory.h...  Actually, 
try adding #include <nsIClassInfoImpl.h> to the file.  See bug 330420.

-- 
Mook
mook dot moz plus blagh
0
Mook
1/16/2008 5:48:35 AM
Try adding:

#include "nsIClassInfoImpl.h"

to the module file


On Jan 15, 10:08=A0am, "Susan Crayne" <cra...@us.ibm.com> wrote:
> I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2),
> with Gecko 1.9b2, so that the XPCOM will work with Firefox 3. =A0The Gecko=
 SDK
> I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip. =A0I have
> re-created the header using the xpidl.exe that comes from the above
> download. =A0When I compile, using the same parameters as when I compiled =
with
> Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp:
0
Mark
1/16/2008 5:14:37 PM
Thanks.  I have added this include, and get more errors.  Previously, I 
added a semicolon to the line

void NS_DECL_CLASSINFO(nsSpeakItImpl);

and that reduced the errors to 4, which are:

1>.\nsSpeakItModule.cpp(36) : error C2275: 'nsSpeakItImpl' : illegal use of 
this type as an expression

1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(22) : see 
declaration of 'nsSpeakItImpl'

1>.\nsSpeakItModule.cpp(36) : error C3861: 'NS_CI_INTERFACE_GETTER_NAME': 
identifier not found

1>.\nsSpeakItModule.cpp(38) : error C2275: 'nsSpeakItImpl' : illegal use of 
this type as an expression

1> c:\webacc\foxwat1\xpcom\nsispeakit.1.9b2\nsSpeakIt.h(22) : see 
declaration of 'nsSpeakItImpl'

1>.\nsSpeakItModule.cpp(38) : error C3861: 'NS_CLASSINFO_NAME': identifier 
not found

With the additional include, the errors are:

1>.\nsSpeakItModule.cpp(26) : error C2143: syntax error : missing ';' before 
'__stdcall'

1>.\nsSpeakItModule.cpp(26) : error C2182: 'nsresult' : illegal use of type 
'void'

1>.\nsSpeakItModule.cpp(26) : error C2377: 'nsresult' : redefinition; 
typedef cannot be overloaded with any other symbol

1> c:\webacc\foxwat1\xpcom\gecko-sdk-1.9b2\include\nscore.h(327) : see 
declaration of 'nsresult'

1>.\nsSpeakItModule.cpp(26) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

1>.\nsSpeakItModule.cpp(36) : error C2440: 'initializing' : cannot convert 
from 'int (__stdcall *)(PRUint32 *,nsIID ***)' to 'NSGetInterfacesProcPtr'

1> None of the functions with this name in scope match the target type

1>.\nsSpeakItModule.cpp(41) : error C2146: syntax error : missing ';' before 
identifier 'NSGetModule'

1>.\nsSpeakItModule.cpp(41) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

1>.\nsSpeakItModule.cpp(41) : error C2370: 'nsresult' : redefinition; 
different storage class

1> .\nsSpeakItModule.cpp(26) : see declaration of 'nsresult'

1>.\nsSpeakItModule.cpp(41) : error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

The module file source is:



#include "xpcom-config.h"

#include "nsIGenericFactory.h"

#include "nsSpeakIt.h"

#include "nsIClassInfoImpl.h"

NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpeakItImpl)

static NS_METHOD nsSpeakItRegistrationProc(nsIComponentManager *aCompMgr,

nsIFile *aPath,

const char *registryLocation,

const char *componentType,

const nsModuleComponentInfo *info)

{

return NS_OK;

}

static NS_METHOD nsSpeakItUnregistrationProc(nsIComponentManager *aCompMgr,

nsIFile *aPath,

const char *registryLocation,

const nsModuleComponentInfo *info)

{

return NS_OK;

}





// For each class that wishes to support nsIClassInfo, add a line like this

void NS_DECL_CLASSINFO(nsSpeakItImpl);

static nsModuleComponentInfo components[ ] =

{

{ "A Component Which Speaks Text",

NS_SPEAKIT_CID,

NS_SPEAKIT_CONTRACTID,

nsSpeakItImplConstructor,

nsSpeakItRegistrationProc ,

nsSpeakItUnregistrationProc ,

nsnull,

NS_CI_INTERFACE_GETTER_NAME(nsSpeakItImpl),

NULL,

&NS_CLASSINFO_NAME(nsSpeakItImpl)

}

};

NS_IMPL_NSGETMODULE(nsSpeakItModule, components)

"Mark Finkle" <mark.finkle@gmail.com> wrote in message 
news:fd1433cd-c150-447d-9dda-f4e1cdfb6972@v46g2000hsv.googlegroups.com...

Try adding:

#include "nsIClassInfoImpl.h"

to the module file


On Jan 15, 10:08 am, "Susan Crayne" <cra...@us.ibm.com> wrote:
> I am recompiling an XPCOM that works with Gecko 1.8.0.4 (and Firefox 2),
> with Gecko 1.9b2, so that the XPCOM will work with Firefox 3. The Gecko 
> SDK
> I'm using comes from xulrunner-1.9b2pre.en-US.win32.sdk.zip. I have
> re-created the header using the xpidl.exe that comes from the above
> download. When I compile, using the same parameters as when I compiled 
> with
> Gecko 1.8.0.4, I get the following errors in nsSpeakItModule.cpp: 


0
Susan
1/16/2008 5:37:37 PM
Susan Crayne wrote:
> Thanks.  I have added this include, and get more errors.  Previously, I
> added a semicolon to the line
> 
> void NS_DECL_CLASSINFO(nsSpeakItImpl);

Take out the "void" and the ';', now that you're including the header that 
defines NS_DECL_CLASSINFO?

Seriously, debugging this is easier if you just look at the preprocessor output. 
  At that point it should become clear that the "void" and ';' shouldn't be there.

-Boris

0
Boris
1/16/2008 5:47:58 PM
Thanks, that did it.  However now there there is an undefined link 
reference:

nsSpeakItImpl_GetInterfacesHelper

which is defined in nsIClassInfoImpl.h

I grepped the libraries in the SDK's lib directory, and it's not there.


"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:4LSdnVQs8O663hPanZ2dnUVZ_gednZ2d@mozilla.org...
> Susan Crayne wrote:
>> Thanks.  I have added this include, and get more errors.  Previously, I
>> added a semicolon to the line
>>
>> void NS_DECL_CLASSINFO(nsSpeakItImpl);
>
> Take out the "void" and the ';', now that you're including the header that 
> defines NS_DECL_CLASSINFO?
>
> Seriously, debugging this is easier if you just look at the preprocessor 
> output. At that point it should become clear that the "void" and ';' 
> shouldn't be there.
>
> -Boris
> 


0
Susan
1/16/2008 7:31:26 PM
Susan Crayne wrote:
> Thanks, that did it.  However now there there is an undefined link
> reference:
> 
> nsSpeakItImpl_GetInterfacesHelper

Did you actually implement classinfo?  Or just declare that you have it, but not 
implement it?

Put another way, what does your QueryInterface implementation look like?

-Boris

0
Boris
1/16/2008 9:20:34 PM
If I understand you correctly,  this is what I use to implement the 
interface:

NS_IMPL_ISUPPORTS1(nsSpeakItImpl, nsISpeakIt);

Now I don't believe that this includes GetInterfacesHelper, but when I use 
NS_IMPL_ISUPPORTS1_CL, I get compile errors of this sort:



1>.\nsSpeakIt.cpp(37) : error C2259: 'nsISpeakIt' : cannot instantiate 
abstract class

1> due to following members:

1> 'nsresult nsISupports::QueryInterface(const nsIID &,void **)' : is 
abstract

1> c:\webacc\foxwat1\xpcom\gecko-sdk-1.9b2\include\nsISupportsBase.h(86) : 
see declaration of 'nsISupports::QueryInterface'

1> 'nsrefcnt nsISupports::AddRef(void)' : is abstract

1> c:\webacc\foxwat1\xpcom\gecko-sdk-1.9b2\include\nsISupportsBase.h(94) : 
see declaration of 'nsISupports::AddRef'



"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:d4WdnV9jrpdm6RPanZ2dnUVZ_hWdnZ2d@mozilla.org...
> Susan Crayne wrote:
>> Thanks, that did it.  However now there there is an undefined link
>> reference:
>>
>> nsSpeakItImpl_GetInterfacesHelper
>
> Did you actually implement classinfo?  Or just declare that you have it, 
> but not implement it?
>
> Put another way, what does your QueryInterface implementation look like?
>
> -Boris
> 


0
Susan
1/17/2008 3:29:14 PM
Susan Crayne wrote:
> Now I don't believe that this includes GetInterfacesHelper, but when I use
> NS_IMPL_ISUPPORTS1_CL, I get compile errors of this sort:

Use it how, exactly?  And what is "NS_IMPL_ISUPPORTS1_CL"?  Did you mean 
"NS_IMPL_ISUPPORTS1_CI"?

-Boris

P.S.  Instead of "when I use X", please, please just include your code snippet, 
directly if it's small and via pastebin or other web UI if it's large. 
Mind-reading is very difficult, and I have to admit that my first instinct was 
to just ignore this thread at this point.  :(

0
Boris
1/17/2008 5:56:44 PM
Please accept my apology.  I had posted the module code previously, but I 
shouldn't have assumed that you would hunt throught the previous posts to 
find it.  Now I have put the code into pastebin, under "Susan Crayne".


"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:WbGdnXXU0cgoCxLanZ2dnUVZ_gmdnZ2d@mozilla.org...
> Susan Crayne wrote:
>> Now I don't believe that this includes GetInterfacesHelper, but when I 
>> use
>> NS_IMPL_ISUPPORTS1_CL, I get compile errors of this sort:
>
> Use it how, exactly?  And what is "NS_IMPL_ISUPPORTS1_CL"?  Did you mean 
> "NS_IMPL_ISUPPORTS1_CI"?
>
> -Boris
>
> P.S.  Instead of "when I use X", please, please just include your code 
> snippet, directly if it's small and via pastebin or other web UI if it's 
> large. Mind-reading is very difficult, and I have to admit that my first 
> instinct was to just ignore this thread at this point.  :(
> 


0
Susan
1/17/2008 9:14:03 PM
Susan Crayne wrote:
> Please accept my apology.  I had posted the module code previously, but I
> shouldn't have assumed that you would hunt throught the previous posts to
> find it.

Susan, I did read the previous post.  But you just changed something to "use
NS_IMPL_ISUPPORTS1_CL".  That's the part I'd like to see.  Sorry for not making 
that clearer.

> Now I have put the code into pastebin, under "Susan Crayne".

Which pastebin?  Most pastebins need a numeric ID to retrieve the information; 
certainly pastebin.mozilla.org (if that's what you used) does...

-Boris

0
Boris
1/17/2008 10:32:12 PM
A piece of the implementation file is in pastebin.mozilla.org/306271

"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:CcWdnf_LJrnYShLanZ2dnUVZ_uvinZ2d@mozilla.org...
> Susan Crayne wrote:
>> Please accept my apology.  I had posted the module code previously, but I
>> shouldn't have assumed that you would hunt throught the previous posts to
>> find it.
>
> Susan, I did read the previous post.  But you just changed something to 
> "use
> NS_IMPL_ISUPPORTS1_CL".  That's the part I'd like to see.  Sorry for not 
> making that clearer.
>
>> Now I have put the code into pastebin, under "Susan Crayne".
>
> Which pastebin?  Most pastebins need a numeric ID to retrieve the 
> information; certainly pastebin.mozilla.org (if that's what you used) 
> does...
>
> -Boris
> 


0
Susan
1/17/2008 11:07:27 PM
Susan Crayne wrote:
> A piece of the implementation file is in pastebin.mozilla.org/306271

Thanks!

So you _are_ using NS_IMPL_ISUPPORTS1_CL.  There is no such thing.  You 
presumably want:

NS_IMPL_ISUPPORTS1_CI(nsSpeakItImpl, nsISpeakIt)

-Boris

0
Boris
1/18/2008 2:21:43 AM
Thanks, Boris,  for catching that.  When I replace that line and compile, I 
get the same sort of compile errors as before.

Susan

"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:nZKdnVJwFsCMkA3anZ2dnUVZ_rTinZ2d@mozilla.org...
> Susan Crayne wrote:
>> A piece of the implementation file is in pastebin.mozilla.org/306271
>
> Thanks!
>
> So you _are_ using NS_IMPL_ISUPPORTS1_CL.  There is no such thing.  You 
> presumably want:
>
> NS_IMPL_ISUPPORTS1_CI(nsSpeakItImpl, nsISpeakIt)
>
> -Boris
> 


0
Susan
1/18/2008 2:32:12 PM
Susan Crayne wrote:
> Thanks, Boris,  for catching that.  When I replace that line and compile, I
> get the same sort of compile errors as before.

As before when?  What are the actual errors?  What does the code look like?

-Boris, feeling like he's pulling teeth

0
Boris
1/18/2008 2:42:14 PM
I have put the source of the implementation file in 
pastebin.mozilla.org/30666
I have put the error messages in pastebin.mozilla.org/30667
Thank you for spending time on this.

Susan

"Susan Crayne" <crayne@us.ibm.com> wrote in message 
news:_dOdnQuErZAvQhLanZ2dnUVZ_vKunZ2d@mozilla.org...
>A piece of the implementation file is in pastebin.mozilla.org/306271
>
> "Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
> news:CcWdnf_LJrnYShLanZ2dnUVZ_uvinZ2d@mozilla.org...
>> Susan Crayne wrote:
>>> Please accept my apology.  I had posted the module code previously, but 
>>> I
>>> shouldn't have assumed that you would hunt throught the previous posts 
>>> to
>>> find it.
>>
>> Susan, I did read the previous post.  But you just changed something to 
>> "use
>> NS_IMPL_ISUPPORTS1_CL".  That's the part I'd like to see.  Sorry for not 
>> making that clearer.
>>
>>> Now I have put the code into pastebin, under "Susan Crayne".
>>
>> Which pastebin?  Most pastebins need a numeric ID to retrieve the 
>> information; certainly pastebin.mozilla.org (if that's what you used) 
>> does...
>>
>> -Boris
>>
>
> 


0
Susan
1/18/2008 4:17:49 PM
Susan Crayne wrote:
> I have put the source of the implementation file in
> pastebin.mozilla.org/30666
> I have put the error messages in pastebin.mozilla.org/30667

Those URIs both give empty text... are they correct?

-Boris

0
Boris
1/18/2008 4:51:59 PM
I am sorry -- they are 306666 and 306667

"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:hLSdncvt3NGVRA3anZ2dnUVZ_rLinZ2d@mozilla.org...
> Susan Crayne wrote:
>> I have put the source of the implementation file in
>> pastebin.mozilla.org/30666
>> I have put the error messages in pastebin.mozilla.org/30667
>
> Those URIs both give empty text... are they correct?
>
> -Boris
> 


0
Susan
1/18/2008 6:15:13 PM
Susan Crayne wrote:
> I am sorry -- they are 306666 and 306667

Ah, ok.  What does your nsSpeakIt.h look like?  I assume that's where "class 
nsSpeakItImpl" is declared?

-Boris

0
Boris
1/19/2008 5:52:11 AM
From your message I got the idea that I should add

#iinclude "nsIClassInfoImpl.h"

to my nsSpeakIt.h file.  It worked!  Now I have two undefined external 
references in my link, but since they are functions I call directly, I think 
I can figure out how to get rid of them.  Thank you very much for your 
patience with this.


"Boris Zbarsky" <bzbarsky@mit.edu> wrote in message 
news:WcKdnQhYLfl5EgzanZ2dnUVZ_vvinZ2d@mozilla.org...
> Susan Crayne wrote:
>> I am sorry -- they are 306666 and 306667
>
> Ah, ok.  What does your nsSpeakIt.h look like?  I assume that's where 
> "class nsSpeakItImpl" is declared?
>
> -Boris
> 


0
Susan
1/19/2008 7:14:41 AM
Reply:

Similar Artilces:

build xpcom with gecko 1.9
I've moved from gecko 1.8 to 1.9 and tried to build my component. After many other problems I got to one I can't resolve. I'm getting error: 'NS_NewGenericModule2': identifier not found If i set preprocessor to XPCOM_GLUE_USE_NSPR this error will vanish, but many others about linkage occures. Is there any special preprocessor or something I have to use? I tried also XP_WIN and XP_WIN32 preprocessors I found somewhere mentioned, but with the same result. Only part of errors is following: unresolved external symbol "unsigned int __fastcall NS_TableDrivenQI...

Can't load xpcom component under Gecko 1.9
I have a C++ xpcom component currently working under Gecko 1.8/Firefox2. The component is accessed via javascript (xpconnect). I am running Mac OS X. I am trying to move the component over to Gecko 1.9/Firefox3. I get the error "Components.classes[cid] is undefined" when I try to access the component from my javascript. If I build Firefox from source with --enable-debug, the component works. If I build Firefox from source as a release, or use the public release, the component does not work. Oddly, Firefox3 with --enable-debug works even when I load the old version o...

Unable to get nsIDOMWindowInternal , queryInterface working in gecko 2 but not in gecko 1.9.2(gecko sdk 2 is not backward compatible with gecko sdk 1.9.2)
Hi, The extension which i have developed for firefox 3.* was working very fine with gecko sdk 1.9.2 After the release of gecko sdk 2 for firefox 4, i started making the changes and my extension works fine with firefox 4. I have used the following line of code for backward compatibily with sdk 1.9.2 NS_IMPL_MOZILLA192_NSGETMODULE(&kSampleModule) But my extension is not working properly in firfox 3.6 with Gecko sdk 2. I'm unable to get the nsIDOMWindowInternal interface using which i'm getting nsIDOMLocation to get the firefox currently viewed URL. The following is...

removing OJI, LiveConnect, and the XPCOM plugin API in Gecko 1.9.2
We're currently planning to remove OJI, LiveConnect, and the XPCOM plugin API from Gecko 1.9.2. We've worked hard to get to a point where this would be possible and I believe we can make these changes in Gecko 1.9.2. We are planning to remove those components because they are largely unmaintained, they have few consumers, and there are better alternatives. To put this change in perspective in terms of a timeline, the earliest a browser with those changes would ship would be approximately Q2 2010. There are three major consumers of these components - Sun's Java plug...

SeaMonkey 2.1
An increasing number of features are diverging between Gecko 1.9.2 and Gecko 1.9.3; this gives us a number of options, with pros and cons for each, but please don't consider this an exhaustive list. 1. Stick with 1.9.2 for now, don't use 1.9.3 features at all * Pro: We know what features we have to port * Con: Lots of catching up on trunk after comm-central forks/after releasing 2.1 2. Write code using feature detection for 1.9.3/backward compatibility for 1.9.2 * Pro: More flexible than any other option * Co...

August 22 & 23 Gecko 1.9/Gran Paradiso and Gecko 1.9 bug triage meetings
The next Gecko 1.9/Gran Paradiso meeting will be on Wednesday, August 22nd, at 11am. The agenda is at http://wiki.mozilla.org/Firefox3/Status -- please add any agenda items before the meeting. The next Gecko 1.9 bug triage meeting will be on Thursday, August 23rd, at 3pm, using the same dial-in info. Meeting Details * Wednesday, August 22nd, 11:00 am PDT (18:00 UTC) * Mozilla HQ, 1st floor conference table * +1 866 216 2181 (or +1 303 228 0514) * join irc.mozilla.org #granparadiso for back channel - Vla Er, these dates should be August 23rd and August 24th, respect...

Purpose of dev-tech-xpcom
What's the purpose of this list? I used to think it was about XPCOM itself, basically for questions about the code in xpcom/**. However, that doesn't seem to be how everyone else uses it. In fact, it seems to be about all coding questions that are somewhat Firefox- or XULRunner-related. Basically what the platform or extension lists are supposed to be. Should we, therefore, delete this list/newsgroup? As it is used, it is redundant. -christian -- All the world's a stage, And all the men and women merely players: They have their exits and their entrances...

August 9/10 Gecko 1.9/Gran Paradiso status meeting + 1.9 triage meeting
The next Gecko 1.9/Gran Paradiso meeting will be on Wednesday, August 9th, at 11am. The agenda is at http://wiki.mozilla.org/Firefox3/Status -- please add any agenda items before the meeting. The next Gecko 1.9 bug triage meeting will be on Thursday, August 10th, at 3pm, using the same dial-in info. Meeting Details * Wednesday, August 9th, 11:00 am PDT (18:00 UTC) * Mozilla HQ, 1st floor conference table * +1 866 216 2181 (or +1 303 228 0514) * join irc.mozilla.org #granparadiso for back channel - Vla ...

Compiling XPCOM with gecko-sdk 15 and above.
Hello.=20 I have binary c++ XPCOM component. I've tried to build it with xulrunner-sd= k-15.0.1 (16 and above) and receive linker error:=20 xpcomglue_s.lib(nsStringAPI.obj) : error LNK2001: unresolved external symbo= l __imp___snprintf=20 xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp__rand=20 xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp__srand=20 xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp___fdopen=20 xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved ext...

Compiling XPCOM with gecko-sdk 15 and above.
Hello. I have binary c++ XPCOM component. I've tried to build it with xulrunner-sd= k-15.0.1 (16 and above) and receive linker error: xpcomglue_s.lib(nsStringAPI.obj) : error LNK2001: unresolved external symbo= l __imp___snprintf xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp__rand xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp__srand xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __imp___fdopen xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol = __...

XPCOM gecko-sdk 1.8
I've got an XPCOM object which, when linked with gecko sdk 1.7, works as expected. I have a function declared in the idl which is defined something like this: /* AString getSomeText (); */ NS_IMETHODIMP MyXPCOM::GetSomeText(nsAString & _retval) { _retval.Assign(TL("Oh jolly good show, old boy!")); return NS_OK; } the relevent js code is: var szSomeText = myXPCOMobj.getSomeText(); alert('Text = ' + szSomeText); As mentioned, this works fine. The text is displayed in the messagebox as expected. When I instead link my object with gecko...

Firefox 3.1/Gecko 1.9.1 Beta 1 Freeze Date
All, We've discussed this a bit already, but I think it makes sense to nail down a date for the Beta 1 freeze date. Beta 1 is a feature freeze, so if you have a feature you are working on, it's time to start wrapping it up. After discussing dates with quite a few people and hearing people ask for more time, August 19th seems appropriate. That's a Tuesday, and we can take a look in that day's Firefox 3.1 meeting to see where things stand. Any concerns regarding this date? Other things I'm noticing/watching/obsessing over: * There's still ab...

superreview requested: [Bug 226609] xpcom compilation failure under cygwin/mingw 3.3.1 & 3.3.3 : [Attachment 142494] Fix leftover mingw 3.3.1 & 3.3.3 issues
cls <cls@seawood.org> has asked David Baron <dbaron@dbaron.org> for superreview: Bug 226609: xpcom compilation failure under cygwin/mingw 3.3.1 & 3.3.3 http://bugzilla.mozilla.org/show_bug.cgi?id=226609 Attachment 142494: Fix leftover mingw 3.3.1 & 3.3.3 issues http://bugzilla.mozilla.org/attachment.cgi?id=142494&action=edit ...

Compiling Binary XPCOM Plugin with Gecko 15
I maintain a binary XPCOM component for Firefox. While compiling it with the Gecko SDK 15 I get the following error: xpcomglue_s_nomozalloc.lib(nsStringAPI.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj I compile with Visual Studio 2010. With Visual Studio 2008 there seems to be no problem, but the plug in won't be loaded. Building with release mode is no problem. Why is the debug level set to zero here? Is there a special debug version of it? Is there a changelog/blog/FAW for the...

Web resources about - Compiling XPCOM with Gecko 1.9 - mozilla.dev.tech.xpcom

Cool tools for compiling to JavaScript
Every programmer has a favorite language or two. JavaScript lovers are the luckiest these days because their language is taking over the Internet ...

Feds put protest activity under microscope in compiling national 'risk forecast'
Use of social media, the spread of "citizen journalism," and the involvement of young people are among the key trends highlighted by a federal ...

10 Tips For Compiling A Deal Sheet
Compiling a deal sheet is a great way of taking stock of your experience and of seeing where your experience may be lacking.

Compiling 64-Bit Code
Describes the 64-bit features available in OS X.

Is there a benefit to compiling your code as you go?
Stack Exchange This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users ...

6 cool tools for compiling to JavaScript
Every programmer has a favorite language or two. JavaScript lovers are the luckiest these days because their language is taking over the Internet ...

Compiling The Absurd Box Score For Space Jam ; Or, Shawn Bradley Sucked Against Cartoons, Too
This is Regressing, a numbers-minded column by our clever friends at the Harvard College Sports Analysis Collective. Over the next few days, ...

We're Compiling Every Police-Involved Shooting In America. Help Us.
The United States has no database of police shootings. There is no standardized process by which officers log when they've discharged their weapons ...

Flat UI Pro Tutorial: Setting and Compiling Using LESS
In this video tutorial, you use components from Flat UI Pro to create a complete simple mail app using LESS. He takes you through the steps to ...

Industrious 4chan user is compiling a list of every videogame ever made
... me to enter a few hundreds of games into my Backloggery account , and I haven't even finished it yet. Ambitious 4chan user Data_baser is compiling ...

Resources last updated: 12/3/2015 10:55:21 AM