this simple program doesn't compile :-(
Andre Kirchner
sieg1974@yahoo.com
Sun Jan 19 20:15:00 GMT 2003
Ok, this was a stupied question. Sorry for that.
I asked it, because when I commented the line "dev =
pcap_lookupdev( errbuf );" the program was compiled
without any problem ( and without any new line ), so I
thought the error was somewhere else.
Andre
--- Andre Kirchner <sieg1974@yahoo.com> wrote:
> 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
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the Gcc-help
mailing list