this simple program doesn't compile :-(

Andre Kirchner
Sun Jan 19 19:15:00 GMT 2003


I'm trying to compile this simple program with the
command "gcc ./main.c -lpcap"

#include <pcap.h>
#include <stdio.h>

int main( int argc, char * argv[] )
  char *dev;
  char errbuf[ PCAP_ERRBUF_SIZE ];
  dev = pcap_lookupdev( errbuf );
  if( dev == NULL )
   printf( "%s\n", errbuf );
   exit( 1 );
  return( 0 );

but it doesn't work and I get the following error
message "main.c:17:2: warning: no newline at end of

Does anyone have any idea about what is wrong?

Thanks a lot,


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the Gcc-help mailing list