Help with GCC - part II
- From: Daniel Carrera <dcarrera math toronto edu>
- To: <gnumeric-list gnome org>
- Cc: Dark Knight <dark knight uni de>
- Subject: Help with GCC - part II
- Date: Fri, 17 May 2002 17:13:49 -0400 (EDT)
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]