this simple program doesn't compile :-(

Andre Kirchner sieg1974@yahoo.com
Sun Jan 19 19:15:00 GMT 2003


Hi,

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
file"

Does anyone have any idea about what is wrong?

Thanks a lot,

Andre



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the Gcc-help mailing list