On Fri, Jun 11, 2004 at 09:10:41AM -0700, [EMAIL PROTECTED] wrote:
> Not to reply to my own message or what not ;)...
> 
> I did fix it, kind of.  It is really weird.  Using pthreads, I was still dependent 
> on 
> cygwin1.dll.  I went ahead and installed the pthreads-win32 version for mingw and 
> then compiled the program again using cygwin (and the mno-cygwin) plus pointing it 
> to the mingw lib/includes.  This threw up some error about redefining stuff:
> 
> In file included from ../../include/pcap-stdinc.h:49,
>                  from ../../include/pcap.h:41,
>                  from sniffsniffer.c:1:
> ../../include/bittypes.h:36: error: redefinition of `int8_t'
> /cygdrive/c/mingw/include/stdint.h:27: error: `int8_t' previously declared here
> ../../include/bittypes.h:52: error: redefinition of `int16_t'
> /cygdrive/c/mingw/include/stdint.h:29: error: `int16_t' previously declared here
> 
> ../../include/bittypes.h:71: error: redefinition of `int32_t'
> /cygdrive/c/mingw/include/stdint.h:31: error: `int32_t' previously declared here
> 
> So I hacked the pcap-stdinc.h file and removed the include to bittypes...
> 
> Now it compiles competely (no errors or warnings) and runs perfectly... Now that 
> cygwin1.dll is out of there...
> 
> Any idea why this happened? Or am I making this too complicated.. or what!  I hate 
> to hack up that include file, especially when I don't know why.
> 

Glad you got it going. int32_t etc is a fairly obvious name for a type
(and I think C99 defines it?). I also had similar issues with something
else defining the type, so I always #define HAVE_U_INT32_T before
including pcap.h in my code, which prevents pcap from trying to define
them.

~Ainsley


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to