Re: Help with GCC - part II
- From: Jon Dyte <jon totient demon co uk>
- To: Daniel Carrera <dcarrera math toronto edu>
- Cc: <gnumeric-list gnome org>, Dark Knight <dark knight uni de>
- Subject: Re: Help with GCC - part II
- Date: Fri, 17 May 2002 21:57:27 +0100 (BST)
The code between #ifdef STANDALONE and #endif
only gets included if STANDALONE is defined.
Jon
dcarrera math toronto edu wrote :-> Actually, my "hello.c" was wrong (but my system *IS* broken). In my panic
I wrote 'print' instead of 'printf'.
Now, here is a test-case that shows the problems I'm having.
#include<stdio.h>
#ifdef STANDALONE
int
main ()
{
printf("Hello world: \n");
return(0);
}
#endif
When I compile this I get:
$ gcc -Wall testing.c -o testing
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function
`_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18):
undefined reference to `main'
collect2: ld returned 1 exit status
If I comment-out the '#ifdef STANDALONE' and '#endif' lines, the program
compiles and runs fine.
Any help would be greatly appreciated.
Daniel.
_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]