Question

I am trying to build a Firefox extension that makes use of IDL. However, the build dies with this error:

[apply] Executing 'python' with arguments:
[apply] 'C:\Users\Dad\Documents\Sage\xulrunner-sdk/sdk/bin/typelib.py'
[apply] '-I'
[apply] 'C:\Users\Dad\Documents\Sage\xulrunner-sdk/idl/'
[apply] '-o'
[apply] 'C:\Users\Dad\Documents\Sage\build\xpi\components\sageIFeedParserListener.xpt'
[apply] 'C:\Users\Dad\Documents\Sage\src\components\sageIFeedParserListener.idl'
[apply]
[apply] Traceback (most recent call last):
[...]
[apply]   File "C:\Users\Dad\Documents\Sage\xulrunner-sdk\sdk\bin\xpidl.py", line 959, in resolve
[apply]     self.realtype = method.iface.idl.getName(self.type, self.location)
[apply]   File "C:\Users\Dad\Documents\Sage\xulrunner-sdk\sdk\bin\xpidl.py", line 271, in getName
[apply]     raise IDLError("type '%s' not found" % id, location)
[apply] xpidl.IDLError: error: type 'PRInt64' not found, sageIFeedItemEnclosure.idl line 44:32
[apply]   void init(in AString link, in PRInt64 length, in AString mimeType);

I'm using the latest release version of xulrunner-sdk (20), which I installed by simply unpacking into a folder; I don't believe I need to do anything else but perhaps I'm wrong about that? I have Python 2.7.3. The paths in the typelib.py call seem to be correct. The IDL file itself is straightforward and looks like this:

#include "nsISupports.idl"

[scriptable, uuid(73C6ECE6-0D9F-474C-8959-3979D2D1CBDB)]
interface sageIFeedItemEnclosure: nsISupports {

    void init(in AString link, in PRInt64 length, in AString mimeType);
}

And I can see that PRInt64 is defined in nsISupportsPrimitives.idl. However, I get the same error even if I specifically include that file in the IDL file I'm trying to compile, so I suspect this is some other problem.

Any ideas?

Was it helpful?

Solution

The 64bit integer data type int64_t is defined in nsrootidl.idl, which is included by nsiSupports.idl and so available everywhere.

What you see in nsISupportsPrimitives.idl is the declaration of the nsISupportsPRInt64 interface.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top