[Winpcap-users] problem compiling winpcap example

Tran Thanh Dinh dinh107 at yahoo.com
Mon May 29 09:26:26 GMT 2006


Hi,

  I tried also to compile the example of retrieving device, and the error message I get is:
error C2065: 'PCAP_SRC_IF_STRING' : undeclared identifier
error C3861: 'pcap_findalldevs_ex': identifier not found 
error C2561: 'wmain' : function must return a value

  The same error is displayed with cygwin and visual C++. I found one same topic in the archive but I dont know what the final solution is. Could you help me out please?

  Concerning the basic_dump example,I use Visual C++ to compile it successfully but while running, I always get the Debug Assertion Failed. 

  Thanks for your help,
  Best regards,

Dinh Tran 

Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:          Probably the Borland compiler doesn't add a definition of _WIN32 (or WIN32, I don't remember) in the preprocessor definitions.
   
  Try to add those definitions to your preprocessor directives. Moreover, consider that we do not provide any support for Borland compilers, no I'm not sure if the lib files we  provide (that are for Microsoft Visual C compilers) are usable by the Borland compiler/linker.
   
  Have a nice day
  GV
   
   
    ----- Original Message ----- 
  From: Tran Thanh Dinh 
  To: winpcap-users at winpcap.org 
  Sent: Friday, May 26, 2006 7:46 AM
  Subject: [Winpcap-users] problem compiling winpcap example
  

    Hi,
   
    I installed winpcap and downloaded the developer package. In order to run the examples given in developer package, I use Borland compiler (bcc32). I followed the instruction to add the linker to the lib and include. But I still dont succeed to compile the examples; and get error:
  pcap.h: unable to open include file 'sys/time.h'
  pcap-bpf.h: , expected 
  ...., etc
   
    I checked the pcap.h file and actually in this one there's:
  #if defined(win32)
  ...
  #elif defined(MSDOS)
  ...
  #else /*UNIX*/
  #include <sys/types.h>
  #include <sys/time.h>
  #endif
   
    I am not running on a Unix, why did I have error with "sys/time.h" please?
   
    Thanks for your help,
    Best regards,
   
  Dinh


     

    
---------------------------------
  Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.     
---------------------------------
    
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users



 


		
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060529/6d01ae31/attachment.htm


More information about the Winpcap-users mailing list