切换到使用 GeckoSDK 1.9.1 后,插件在 Linux 上停止工作
我有一个插件,当我将其与 GeckoSDK 1.9 链接时工作正常。
现在我改用 GeckoSDK 1.9.1.16,它在 Linux 上不再被检测到(在 Windows 上它仍然工作正常) - about:plugins 不再显示它!
除了在 makefile 中切换 INCLUDE/LIB 目录以及重命名 nppupp.h -> 之外,没有其他任何更改。 npfunctions.h。
我用 Firefox 3.5、3.6 和 4.0 beta 进行了测试 - 结果相同。
有什么想法吗?
I have a plugin, which works fine, when I link it with GeckoSDK 1.9.
Now I switched to using GeckoSDK 1.9.1.16, and it stopped getting detected on Linux (on Windows it still works fine) - about:plugins doesn't show it any more!
There were no other changes, other than switching INCLUDE/LIB directories in the makefile, and renaming nppupp.h -> npfunctions.h.
I tested it with Firefox 3.5, 3.6 and 4.0 beta - the same result.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果它是原始 NPAPI 插件,我建议使用 npapi-headers 项目,该项目提供应该适用于所有浏览器和所有平台的标头。 gecko-sdk 的 npapi 标头偶尔会给我带来问题。我想说这至少值得一试。
if it's a raw NPAPI plugin I would recommend using the npapi-headers project, which provides headers that should work on all browsers and all platforms. The npapi headers from the gecko-sdk have occasionally given me problems. I'd say it's at least worth a try.
好吧,如果有人感兴趣,我会回答我自己的问题。
事实证明,他们不仅仅是重命名 npupp.h -> npfunctions.h,但以某种方式重新排列了标题。
结果,npfunctions.h 在定义 XP_UNIX 之前被包含(在 prcpucfg.h 中),这反过来又导致我的代码中的 npentry 函数(NP_GetMIMEDescription 等)在没有事先声明的情况下被定义,因此具有 C++ 链接,因此浏览器找不到它。
你好,Mozilla,自包含标头怎么了?
Ok, in case anyone is interested, I'll answer my own question.
It turns out they didn't just rename npupp.h -> npfunctions.h, but rearranged the headers somehow.
As a result, npfunctions.h got included before XP_UNIX is defined (in prcpucfg.h), which in turn led to npentry functions (NP_GetMIMEDescription, etc) in my code getting defined without being previously declared, hence having C++ linkage, hence the browser couldn't find it.
Hello Mozilla, what's up with self-contained headers?