This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Custom Plugin won’t Build

0

I'm currently attempting to add a custom plugin to the Wireshark that I built from source for Windows 7. Everything's gone okay so far, but when I try to build with the plugin added (following the README.plugin instructions) I am getting a long series of errors from wireshark\epan\proto.h. Just before these start, I'm seeing several warnings from Visual Studio\VC\INCLUDE\stdarg.h, where no object file is generated and it talks about macro redefinitions. What could be causing this?

Edit: Looking at the Linux version of Wireshark that successfully uses this plugin, I noticed that there is a reference to the plugin directory in the file "configure.in." I'm not seeing configure.in in my version of Wireshark at all. Is this just a difference between the Windows and Linux versions, or am I missing a file?

asked 14 Jan '15, 11:05

mehubb985's gravatar image

mehubb985
118810
accept rate: 0%

edited 14 Jan '15, 12:09

We'll need to see the errors to work out what's failing. How are you adding the plugin to the build, as an custom extension or a permanent one?

(14 Jan '15, 13:54) grahamb ♦

I was trying to do a permanent extension, but have since switched to custom for simplicity. I undid all the changes I had made to the basic Wireshark and rebuilt to make sure everything was working, and it was fine. I then copied the Custom.m4, Custom.make, and Custon.nmake files into the plugins directory, replacing foo with my plugin name. Now I'm getting a bunch of errors in the epan subdirectory.

As for the specific errors, there are all sorts of syntax errors in epan\proto.h. Like, missing parenthesis and expected constant expression kind of stuff. I have no idea what could be causing it, but it's the same error I had when trying to do a permanent plugin.

(16 Jan '15, 10:58) mehubb985

To minimise the output, you could just run nmake in the plugin directory.

It sounds as though there's something wrong in the code before proto.h is included.

(16 Jan '15, 11:55) grahamb ♦