首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到XPIDL (typelib.py)类型错误

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

Stack Overflow用户
提问于 2013-04-08 03:27:17
回答 1查看 250关注 0票数 0

我正在尝试构建一个使用IDL的Firefox扩展。但是,构建会终止,并显示以下错误:

代码语言:javascript
复制
[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文件本身很简单,看起来像这样:

代码语言:javascript
复制
#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文件中特别包含该文件,也会得到相同的错误,所以我怀疑这是其他问题。

有什么想法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-08 17:38:49

64位整数数据类型int64_t是在nsrootidl.idl中定义的,它包含在nsiSupports.idl中,因此到处都可以使用。

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15866785

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档