XPIDL (typelib.py) 类型未找到错误



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

[apply] Executing 'python' with arguments:
[apply] 'C:UsersDadDocumentsSagexulrunner-sdk/sdk/bin/typelib.py'
[apply] '-I'
[apply] 'C:UsersDadDocumentsSagexulrunner-sdk/idl/'
[apply] '-o'
[apply] 'C:UsersDadDocumentsSagebuildxpicomponentssageIFeedParserListener.xpt'
[apply] 'C:UsersDadDocumentsSagesrccomponentssageIFeedParserListener.idl'
[apply]
[apply] Traceback (most recent call last):
[...]
[apply]   File "C:UsersDadDocumentsSagexulrunner-sdksdkbinxpidl.py", line 959, in resolve
[apply]     self.realtype = method.iface.idl.getName(self.type, self.location)
[apply]   File "C:UsersDadDocumentsSagexulrunner-sdksdkbinxpidl.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 文件中,我也会收到相同的错误,所以我怀疑这是其他一些问题。

有什么想法吗?

64位整数数据类型int64_t定义在 nsrootidl.idl 中,包含在 nsiSupports.idl 中,因此随处可见。

您在nsISupportsPrimitives.idl中看到的是nsISupportsPRInt64接口的声明。

相关内容

最新更新