Hi all, I am using the up-to-date Wireshark source and I was able to build WS on Windows 7 64bit ok. Now I wanted to start with a dissector plugin. For the first try I started with a built-in dissector called packet-mqtt.c and copied that as packet-mqttmod.c to the plugin location. Following the steps in README.plugins. I didn't change anything in the code except the names from mqtt and MQTT to mqttmod to MQTTMOD so I know it is "my" dissector. When I try to build, I get the following error:
If I comment out the error causing code to see if the rest runs through, I get another error:
At least for the second error I found that this is related to dwarf.h/dwarf.c, but I could not find out in which library this is compiled and spot the correct *.lib file. And then still I would not know how to satisfy this dependency for the build. I'd appreciate any suggestions. Best regards, Mike asked 13 Apr '16, 02:15 mikethebo |
One Answer:
Not sure about the first error, what version of Visual Studio are you using? For the second, the function Edit dwarf.h will also need to answered 13 Apr '16, 03:35 grahamb ♦ edited 13 Apr '16, 07:46 |
Yes sorry I forgot. I am using VS2013 and I am setting all environment variables accordingly.
As the files compiles quite happily in its normal place I suspect it's something else that isn't ex\imported. Maybe
tfs_set_notset
, although that is marked as WS_DLL_PUBLICAlso note my edit about dwarf.h above.
This solved the linker error. Thank you. Funny things is, that the first error is related to
TFS(&tfs_set_notset)
. From what I found with google the const char in the typedef of tfs.h might be the cause. If I passNULL
instead ofTFS(&tfs_set_notset)
it is fine.If I remember correctly there is a problem with using global tfs strings on Windows in plugins, somting with DATA and inter dll. You'll be better of defining them locally.
Also check comment in this question for the C2099 error when compiling for Windows.