Wireshark-dev: [Wireshark-dev] [Wireshark plugin build]: Error while compiling plugin

From: shreejith bl <shreejithbl@xxxxxxxxx>
Date: Fri, 19 Jun 2009 10:49:41 -0700 (PDT)
Hello all,

I am trying to build a plugin.dll. I am using the wireshark sources from the revision HEAD (latest source).
I am using VC++ 2008 Express Edition. Same was the case with VS .NET 2003.

I am getting the following error. Can someone please help me in this regard?

Thanks,
Shreejith

Error,
*****************************************************
C:\wireshark\plugins\pluginA>nmake Makefile.nmake "VERSION = " -all /C
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1500 /D_BIND_TO_CURRENT_CRT_VERSIO
N=1 /c packet-boa.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

packet-boa.c
c:\wireshark\epan\ftypes/ftypes.h(256) : error C2054: expected '(' to follow 'WS
_VAR_IMPORT'
c:\wireshark\epan\ftypes/ftypes.h(256) : error C2085: 'fvalue_t_free_list' : not
 in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(276) : error C2085: 'fvalue_from_unparsed' : n
ot in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(279) : error C2085: 'fvalue_from_string' : not
 in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(288) : error C2085: 'fvalue_string_repr_len' :
 not in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(301) : error C2085: 'fvalue_to_string_repr' :
not in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(304) : error C2085: 'fvalue_ftype' : not in fo
rmal parameter list
c:\wireshark\epan\ftypes/ftypes.h(307) : error C2085: 'fvalue_type_name' : not i
n formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(310) : error C2085: 'fvalue_set' : not in form
al parameter list
c:\wireshark\epan\ftypes/ftypes.h(313) : error C2085: 'fvalue_set_uinteger' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(316) : error C2085: 'fvalue_set_sinteger' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(319) : error C2085: 'fvalue_set_integer64' : n
ot in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(322) : error C2085: 'fvalue_set_floating' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(325) : error C2085: 'fvalue_get' : not in form
al parameter list
c:\wireshark\epan\ftypes/ftypes.h(328) : error C2085: 'fvalue_get_uinteger' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(331) : error C2085: 'fvalue_get_sinteger' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(334) : error C2085: 'fvalue_get_integer64' : n
ot in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(337) : error C2085: 'fvalue_get_floating' : no
t in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(340) : error C2085: 'fvalue_eq' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(343) : error C2085: 'fvalue_ne' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(346) : error C2085: 'fvalue_gt' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(349) : error C2085: 'fvalue_ge' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(352) : error C2085: 'fvalue_lt' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(355) : error C2085: 'fvalue_le' : not in forma
l parameter list
c:\wireshark\epan\ftypes/ftypes.h(358) : error C2085: 'fvalue_bitwise_and' : not
 in formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(361) : error C2085: 'fvalue_contains' : not in
 formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(364) : error C2085: 'fvalue_matches' : not in
formal parameter list
c:\wireshark\epan\ftypes/ftypes.h(367) : error C2085: 'fvalue_length' : not in f
ormal parameter list
c:\wireshark\epan\ftypes/ftypes.h(370) : error C2085: 'fvalue_slice' : not in fo
rmal parameter list
C:\wireshark\register.h(40) : error C2085: 'register_action_e' : not in formal p
arameter list
C:\wireshark\register.h(42) : error C2146: syntax error : missing ')' before ide
ntifier 'action'
C:\wireshark\register.h(42) : error C2085: 'register_cb' : not in formal paramet
er list
C:\wireshark\register.h(42) : error C2146: syntax error : missing ',' before ide
ntifier 'action'
C:\wireshark\register.h(42) : error C2059: syntax error : 'type'
C:\wireshark\register.h(42) : error C2059: syntax error : ')'
C:\wireshark\register.h(44) : error C2146: syntax error : missing ')' before ide
ntifier 'cb'
C:\wireshark\register.h(44) : error C2061: syntax error : identifier 'cb'
C:\wireshark\register.h(44) : error C2059: syntax error : ';'
C:\wireshark\register.h(44) : error C2059: syntax error : ','
C:\wireshark\register.h(44) : error C2059: syntax error : ')'
C:\wireshark\register.h(45) : error C2146: syntax error : missing ')' before ide
ntifier 'cb'
C:\wireshark\register.h(45) : error C2061: syntax error : identifier 'cb'
C:\wireshark\register.h(45) : error C2059: syntax error : ';'
C:\wireshark\register.h(45) : error C2059: syntax error : ','
C:\wireshark\register.h(45) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(60) : error C2054: expected '(' to follow 'WS_VAR_IMPO
RT'
c:\wireshark\epan\proto.h(60) : error C2085: 'hf_text_only' : not in formal para
meter list
c:\wireshark\epan\proto.h(73) : error C2085: 'custom_fmt_func_t' : not in formal
 parameter list
c:\wireshark\epan\proto.h(82) : error C2085: 'protocol_t' : not in formal parame
ter list
c:\wireshark\epan\proto.h(160) : error C2085: 'base_display_e' : not in formal p
arameter list
c:\wireshark\epan\proto.h(165) : error C2085: 'header_field_info' : not in forma
l parameter list
c:\wireshark\epan\proto.h(186) : error C2061: syntax error : identifier 'header_
field_info'
c:\wireshark\epan\proto.h(187) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(188) : error C2059: syntax error : '}'
c:\wireshark\epan\proto.h(200) : error C2061: syntax error : identifier 'header_
field_info'
c:\wireshark\epan\proto.h(201) : error C2059: syntax error : '}'
c:\wireshark\epan\proto.h(214) : error C2016: C requires that a struct or union
has at least one member
c:\wireshark\epan\proto.h(214) : error C2061: syntax error : identifier 'header_
field_info'
c:\wireshark\epan\proto.h(224) : error C2059: syntax error : '}'
c:\wireshark\epan\proto.h(262) : error C2061: syntax error : identifier 'field_i
nfo'
c:\wireshark\epan\proto.h(264) : error C2059: syntax error : '}'
c:\wireshark\epan\proto.h(267) : error C2061: syntax error : identifier 'proto_t
ree'
c:\wireshark\epan\proto.h(267) : error C2059: syntax error : ';'
c:\wireshark\epan\proto.h(269) : error C2061: syntax error : identifier 'proto_i
tem'
c:\wireshark\epan\proto.h(269) : error C2059: syntax error : ';'
c:\wireshark\epan\proto.h(334) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(334) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(334) : error C2059: syntax error : ','
c:\wireshark\epan\proto.h(334) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(335) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(335) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(335) : error C2059: syntax error : ','
c:\wireshark\epan\proto.h(335) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(337) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(337) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(338) : error C2146: syntax error : missing ';' before
identifier 'func'
c:\wireshark\epan\proto.h(338) : error C2059: syntax error : 'type'
c:\wireshark\epan\proto.h(338) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(339) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(339) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(340) : error C2146: syntax error : missing ';' before
identifier 'func'
c:\wireshark\epan\proto.h(340) : error C2059: syntax error : 'type'
c:\wireshark\epan\proto.h(340) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(349) : error C2146: syntax error : missing ')' before
identifier 'cb'
c:\wireshark\epan\proto.h(349) : error C2146: syntax error : missing ')' before
identifier 'cb'
c:\wireshark\epan\proto.h(349) : error C2061: syntax error : identifier 'cb'
c:\wireshark\epan\proto.h(349) : error C2059: syntax error : ';'
c:\wireshark\epan\proto.h(349) : error C2059: syntax error : ','
c:\wireshark\epan\proto.h(349) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(370) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(370) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(370) : error C2059: syntax error : 'type'
c:\wireshark\epan\proto.h(370) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(378) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(378) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(378) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(378) : error C2370: 'gint' : redefinition; different s
torage class
        C:\wireshark-win32-libs\glib\include\glib-2.0\glib/gtypes.h(49) : see de
claration of 'gint'
c:\wireshark\epan\proto.h(378) : error C2146: syntax error : missing ';' before
identifier 'idx'
c:\wireshark\epan\proto.h(378) : error C2059: syntax error : ')'
c:\wireshark\epan\proto.h(383) : error C2143: syntax error : missing '{' before
'*'
c:\wireshark\epan\proto.h(383) : error C2143: syntax error : missing ')' before
'*'
c:\wireshark\epan\proto.h(383) : fatal error C1003: error count exceeds 100; sto
pping compilation
NMAKE :  U1077: 'cl' : return code '0x2'
Stop.

**ERROR**
System Call Failed current return_code Sumation = 258
buildboa.bat:
                 Make sure you have run run_before_wireshark_build.bat or used v
cvars to set your VC++ environment
                 Also, be sure wireshark is not currently running. at build_plugin_
tsnc_interface.pl line 391.

Removing temp directory... Cleanup complete.

*****************************************************