Re: why linker complains undefined reference to `main'?
From: James McIninch (james.mcininch.nospam_at_comcast.net)
Date: 04/01/05
- Next message: Tauno Voipio: "Re: Linux Kernel Socket"
- Previous message: Paul Pluzhnikov: "Re: why linker complains undefined reference to `main'?"
- In reply to: baumann.Pan_at_gmail.com: "why linker complains undefined reference to `main'?"
- Next in thread: baumann.Pan_at_gmail.com: "Re: why linker complains undefined reference to `main'?"
- Reply: baumann.Pan_at_gmail.com: "Re: why linker complains undefined reference to `main'?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "baumann.Pan@gmail.com" <baumann.Pan@gmail.com> Date: Thu, 31 Mar 2005 23:47:54 -0500
<posted & mailed>
is main() defined in one of those files?
baumann.Pan@gmail.com wrote:
> Hi all,
> what's the problem? why ? thanks
> when I complile three c source file
> gcc -o prog prog.c additional1.c additonal2.c additional3.c -lpthread
> -DDEBUG -DXXX -DYYY ,
> the compiler generates the message :
> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18):
> In function `_start':
> ../sysdeps/i386/elf/start.S:77: undefined reference to `main'
> collect2: ld returned 1 exit status
-- Remove '.nospam' from e-mail address to reply by e-mail
- Next message: Tauno Voipio: "Re: Linux Kernel Socket"
- Previous message: Paul Pluzhnikov: "Re: why linker complains undefined reference to `main'?"
- In reply to: baumann.Pan_at_gmail.com: "why linker complains undefined reference to `main'?"
- Next in thread: baumann.Pan_at_gmail.com: "Re: why linker complains undefined reference to `main'?"
- Reply: baumann.Pan_at_gmail.com: "Re: why linker complains undefined reference to `main'?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]