Wireshark-dev: [Wireshark-dev] Problem with recommended Makefile.nmake
From: eymanm <[email protected]>
Date: Thu, 14 Jul 2011 13:47:21 -0400
While building a plugin on Windows with Wireshark 1.6.0, I'm trying to follow directions provided in README.plugins. With the recommended content of \plugins\myudp\Makefile.nmake (attachment Recommended_Makefile.nmake) I'm getting compilation errors as shown in attachment CompilationErrors.txt. However, if use a different Makefile.nmake (attachment Modified_Makefile.nmake), the compilation is successful.

Can somebody help to figure out what's wrong with using the recommended Makefile.nmake?

Thanks 
        cd myudp
        "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" /                   -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@[email protected]/myudp/  -e s/@[email protected]/0,4,0,0/  -e s/@[email protected]/1,6,0,0/  -e s/@MODULE_VERS
[email protected]/0.4.0.0/  -e s/@[email protected]/myudp/  -e s/@[email protected]/1.6.0"-SikCH53K"/  -e s/@[email protected]/MSVC2008EE/  < plugin.rc.in
 > myudp.rc
        rc  /r myudp.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /D_NEED_VAR_IMPORT_ -WX -DHAVE_CONFIG_H -D_U_="" /Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1500  /
D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /D_BIND_TO_CURRENT_CRT_VERSION=1 /MP /GS /w34295  /I../.. /IC:\wir
eshark-win32-libs-1.6\gtk2\include\glib-2.0  /IC:\wireshark-win32-libs-1.6\gtk2\lib\glib-2.0\include  /IC:\wireshark-win
32-libs-1.6\WPdpack\include -Fd.\ -c packet-myudp.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

packet-myudp.c
plugin.c
packet-myudp.c(90) : error C2220: warning treated as error - no 'object' file generated
packet-myudp.c(90) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify pre
cedence
packet-myudp.c(782) : warning C4113: 'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
packet-myudp.c(1119) : warning C4244: '=' : conversion from 'double' to 'gfloat', possible loss of data
packet-myudp.c(1219) : warning C4244: '=' : conversion from 'double' to 'gfloat', possible loss of data
packet-myudp.c(1860) : warning C4244: '=' : conversion from 'double' to 'gfloat', possible loss of data
packet-myudp.c(2134) : warning C4244: '=' : conversion from 'guint16' to 'guint8', possible loss of data
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

Attachment: Recommended_Makefile.nmake
Description: Binary data

Attachment: Modified_Makefile.nmake
Description: Binary data