Some days ago I tried to compile the basic NPAPI-Plugin from the Mozilla codebase and of course ran into some problems that could easily be solved, though finding the answers wasn’t that easy.
Here’s the first one, when compiling:
winnt.h. Shouldn’t change something in there. I googled a little and someone knew the problem. He suggested to alter
npplat.h and move some includes after the include of
windows.h. Though this will work, it doesn’t actually sound like something you’re supposed to do. So I digged further and checked out the Gecko-Win32-Plugin-Samples-Package that you can get at MDC. The basic plugin in there compiled fine, which confused me a little, so I diffed the project-files and there I found the solution: The project-file from comm-central missed the preprocessor-tag
I used some XPCOM-Components in my plugin, which lead to another compile-error:
I found someone in the net, having the same problem. Seems there is a
#define GetNextSibling GetWindow somewhere in
windows.h, which collides with the method-declaration of
nsidomnode.h. So I undef’ed it after including
windows.h and got the problem solved.