0

我正在尝试构建一个使用 IDL 的 Firefox 扩展。但是,构建因此错误而终止:

[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);

我正在使用最新版本的 xulrunner-sdk (20),我通过简单地解压到一个文件夹中来安装它;我不相信我需要做任何其他事情,但也许我错了?我有 Python 2.7.3。typelib.py 调用中的路径似乎是正确的。IDL 文件本身很简单,如下所示:

#include "nsISupports.idl"

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

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

我可以看到 PRInt64 是在 nsISupportsPrimitives.idl 中定义的。但是,即使我在尝试编译的 IDL 文件中专门包含该文件,我也会遇到相同的错误,所以我怀疑这是其他问题。

有任何想法吗?

4

1 回答 1

0

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.

于 2013-04-08T09:38:49.480 回答