Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Installing a new dissector

From: WangJing <wj.vivian@xxxxxxxxx>
Date: Mon, 20 Oct 2008 10:29:57 +0800
Such errors below are caused by the variables defining in the middle of the function instead of in front.
packet-adh.c(84) : warning C4101: 'upper_tvb' : unreferenced local variable
packet-adhctl.c
packet-adhctl.c(90) : error C2220: warning treated as error - no 'object' file g
enerated
packet-adhctl.c(90) : warning C4101: 'upper_tvb' : unreferenced local variable
packet-adhctl.c(85) : warning C4101: 'prot_id' : unreferenced local variable
packet-adhctl.c(87) : warning C4101: 'flags' : unreferenced local variable
packet-adhctl.c(88) : warning C4101: 'wrap' : unreferenced local variable
packet-adhctl.c(86) : warning C4101: 'seq' : unreferenced local variable
packet-adhctl.c(81) : warning C4101: 'src_text' : unreferenced local variable
packet-adhctl.c(83) : warning C4101: 'offset_proto' : unreferenced local variabl
e
...

I fix this kind of error, and compile. But I still got the following error. I think the code is used for Ethereal,
and the code is not compliant to Wireshark version..

        link -dll /out:adh.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386 /DEBUG pack
et-adh.obj packet-adhctl.obj packet-adholsr.obj  plugin.obj ..\..\epan\libwiresh
ark.lib  C:\wireshark-win32-libs\glib\lib\glib-2.0.lib  C:\wireshark-win32-libs\
glib\lib\gmodule-2.0.lib  C:\wireshark-win32-libs\glib\lib\gobject-2.0.lib adh.r
es
   Creating library adh.lib and object adh.exp
packet-adh.obj : error LNK2001: unresolved external symbol _etype_vals
packet-adh.obj : error LNK2019: unresolved external symbol _ethertype referenced
 in function _dissect_adh
adh.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.