开发者

Plugin stopped working on Linux after switch to using GeckoSDK 1.9.1

开发者 https://www.devze.com 2023-02-13 02:54 出处:网络
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:plugi

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 t开发者_StackOverflowhe 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?


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.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消