Ethereal-dev: Re: [Ethereal-dev] A few Win32 compile issues

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Mon, 13 Sep 2004 01:29:59 +0200
David Richards wrote:

Just of interest, which version of the winpcap developer pack are you
using? And could you add the compiler output when it's going wrong?

I am using the latest 3.0 developer pack.  The Readme.txt file has the same
info as the one at the WinPcap site.  Here are the first two lines:

* WinPcap Developer's pack    *
* Release 3.0 - August 2002   *

Here's the error I get during wiretap compilation if I do not add '/DWIN32'
to LOCAL_CFLAGS (excerpted from output generated by "nmake -f
makefile.nmake" in root ethereal directory):

...
cd wiretap
nmake /                   -f Makefile.nmake
...
libpcap.c
D:\DevProjects\Ethereal\libs\wpdpack\Include\PCAP.H(44) : fatal error C1083:
Cannot open include file: 'sys/time.h': No such file or directory
netmon.c
...


Some news...

the WIN32 definition is done in win32.mak and put into the cvarsdll variable.


The content of my win32.mak look like this:

!IFDEF NO_ANSI
noansi = -DNULL=0
!ENDIF

# for Windows applications that use the C Run-Time libraries
cvars      = -DWIN32 $(noansi) -D_WIN32
cvarsmt    = $(cvars) -D_MT -MT
cvarsdll   = $(cvars) -D_MT -D_DLL -MD

# for compatibility with older-style makefiles
cvarsmtdll   = $(cvarsmt) -D_DLL


The compilation of libpcap.c is done in wiretap/Makefile.nmake, and the cvarsdll is used here.

The root /Makefile.nmake uses a slightly different mechanism for CVARSDLL, which I've copied to wiretap/Makefile.nmake and checked in.

So this might fix your problem, please report your experiences.

Regards, ULFL