Wireshark-dev: [Wireshark-dev] packet-pce.c causing compile errors on Windows...
From: "Abhik Sarkar" <sarkar.abhik@xxxxxxxxx>
Date: Mon, 24 Dec 2007 19:55:13 +0400
Hello All,

Firstly, Season's greetings to all...

I doubt anyone is going to read this in the next couple of days, but
in case some is stuck monitoring systems like I am ;-) and is reading
this:
On my Windows XP with VCEE, packet-pce.c is causing compilation to
fail due to the define #INTERFACE which seems to conflict with
something else in Windows:

packet-pce.c(149) : error C2220: warning treated as error - no
'object' file generated
packet-pce.c(149) : warning C4005: 'INTERFACE' : macro redefinition
        F:\Program Files\Microsoft Platform SDK for Windows Server
2003 R2\Include\commdlg.h(920) : see previous definition of
'INTERFACE'
Generating Code...
NMAKE : fatal error U1077: '"F:\Program Files\Microsoft Visual Studio
8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"F:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"F:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

I was able to workaround it by changing all occurrences of INTERFACE
with PCE_INTERFACE (lines 149 and 401). If anyone else is facing the
same issue, perhaps a patch from Silvia renaming the macro to
something more suitable is required :-)

Thanks,
Abhik.