custom C/C++ plugin will not load - no indication why
I inherited a custom dissector written in C & C++ from a former coworker. Basically it decodes our internal protobuf messages and a few other internal custom formatted messages. Short of it is, my plugin is not loading, and I'm not receiving any errors or indication that it's trying.
I'm building on 64-bit Windows 10 with VS2015 Professional. I followed the build instructions here to build Wireshark 2.9. I also built protobuf 3.5.1 as a DLL. I reconfigured my dissector to utilize all of the libs that my WS build pulled down and configured. I placed my plugin DLL & the protobuf DLLs in ./run/RelWithDebInfo/plugins/2.9/mydissector.
After all of this, I run WS from ./run/RelWithDebInfo/Wireshark.exe. When I go to the menu Help -> About Wireshark, and select the Plugins tab, I do not see my plugin listed.
I've scoured the documentation, but I don't see any indication of how to go about debugging or tracing this.
Is there a way to turn on some logging or tracing to determine what DLLs WS considered and if/why a DLL was not loaded? I've not found a way to configure it to load a particular plugin DLL and force a report of an error.
Can you try placing the plugins in
./run/RelWithDebInfo/plugins/2.9/epan/
with the rest of the dissector plugins?That's progress... I actually get an error now: The program can't start because libprotobuf.dll is missing from your computer. This leads me to another question: where should dependencies live? I wasn't able to statically link protobuf into my DLL, so do I need to put protobuf in the wireshark root? Add the location to PATH?
Answered my own question on where the dependencies should live, as it seems if they're in the same folder as wireshark.exe, they're picked up automatically.
Also had to rename a symbol;
extern "C" const gchar version[]
->extern "C" const gchar plugin_version[]
. Also had to addextern "C" const gchar plugin_release[] = "2.9";
This has gotten me to the point where my DLL now loads again, however my protocol is not showing up.I would suggest a careful (re-)reading of README.plugins, as well as comparing your plugin with any of the other plugins provided with Wireshark.