This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: FW: undefined reference to `main'
- From: Andrew Haley <aph at redhat dot com>
- To: vinod <vinod dot nanjaiah at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 01 Jul 2009 14:08:16 +0100
- Subject: Re: FW: undefined reference to `main'
- References: <!&!AAAAAAAAAAAYAAAAAAAAABH/JObBABhDuU9tX2fp0MHCgAAAEAAAANrD7NzpoxpNpLZW9fO/nI0BAAAAAA==@gmail.com>
vinod wrote:
>
>
> Hi Andrew..
>
> When I using gcc to compile my code.c to code , I got the error msg as
> follows :
>
>
>
> /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crt1.o: In function
> `_start':
>
> (.text+0x18): undefined reference to `main'
>
> collect2: ld returned 1 exit status
>
>
>
>
>
>
>
> What can I do now, any suggestion?
Give us a test case: the program you're trying to compile and the command
you're using to compile it.
Andrew.