0
我正在嘗試構建一個使用IDL的Firefox擴展。然而,構建與此錯誤死亡:找不到XPIDL(typelib.py)類型錯誤
[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文件中,也會得到相同的錯誤,所以我懷疑這是其他一些問題。
任何想法?
如果將PRInt64更改爲int64_t,會發生什麼情況? – paa 2013-04-07 20:23:48
int64_t的作品。那麼,這告訴我們什麼? – 2013-04-07 21:25:58
看到我的答案,並接受它,如果你不介意:) – paa 2013-04-08 09:38:38