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] Trouble with building Wireshark on Win32

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Wed, 10 Dec 2008 11:04:20 +0000
Moti Shani wrote:
Hello,
 
I have followed the step by step guide on http://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html to build wireshark on my win32 system.
all stages have finished successfully (at least as far as I understand...), but the building (stage 2.2.10 -> 2: nmake -f Makefile.nmake all) failed.
In the attached files there is the output of "nmake -f Makefile.nmake all", "nmake -f Makefile.nmake setup" and the output of "nmake -f Makefile.nmake verify_tools".
I will really appreciate if someone can help me out with this, I wish to get started on writing a new dissector.

I've extracted the build errors from your email below:

packet-dcom.c(2154) : error C2065: 'hf_dcOm_stdobjref' : undeclared identifier
C:\wireshark\wiretap/wtap.h(762) : error C2079: 'cosine' uses undefined struct 'cosine_phdr'

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(463) : error C2061: syntax error : identifier _itoa_s'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(463) : error C2059: syntax error : ';'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(463) : error C2059: syntax error : '['

C:\wireshark-win32-libs\glib\include\glib-2.0\glib/gthread.h(298) : error C2143: syntax error : missing ')' before '*'
C:\wireshark-win32-libs\glib\include\glib-2.0\glib/gthread.h(298) : error C2143: syntax error : missing '{' before '*'
C:\wireshark-win32-libs\glib\include\glib-2.0\glib/gthread.h(298) : error C2059: syntax error : ')'

packet-rmp.c(263) : error C2065: 'dissEctor_handle_t' : undeclared identifier
packet-rmp.c(263) : error C2146: syntax error : missing ';' before identifier 'rmp_handle'
packet-rmp.c(263) : error C2065: 'rmp_handle' : undeclared identifier
packet-rmp.c(267) : error C2065: 'rmp_handle' : undeclared identifier
packet-rmp.c(267) : warning C4047: '=' : 'int' differs in levels of indirection from 'dissector_handle_t'
packet-rmp.c(268) : error C2065: 'rmp_handle' : undeclared identifier
packet-rmp.c(268) : warning C4047: 'function' : 'dissector_handle_t' differs in levels of indirection from 'int'
packet-rmp.c(268) : warning C4024: 'dissector_add' : different types for formal and actual parameter 3
packet-rmp.c(269) : error C2065: 'rmp_handle' : undeclared identifier
packet-rmp.c(269) : warning C4047: 'function' : 'dissector_handle_t' differs in levels of indirection from 'int'
packet-rmp.c(269) : warning C4024: 'dissector_add' : different types for formal and actual parameter 3

There seems to be a couple of case changes in the source files  (packet-dcom.c & packet-rmp.c) that are causing some errors, check using 'svn status' for inadvertent changes to your working copy and correct those.

The other errors may be caused by similar corruption issues (gthread.h) or possibly an older SDK (stdlib.h).

Resolve the changes to your wc first then try again.
-- 
Regards,

Graham Bloice