This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24241] undefined reference to main when linking an object file generated from multiple .c files
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2005 17:44:55 -0000
- Subject: [Bug c/24241] undefined reference to main when linking an object file generated from multiple .c files
- References: <bug-24241-11474@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-06 17:44 -------
Subject: Re: undefined reference to main when linking an object file generated
from multiple .c files
>
>
>
> ------- Comment #3 from indan at nul dot nu 2005-10-06 17:27 -------
> (In reply to comment #2)
> > Note if you want the compiling multiple .c into one .o files use -combine.
> >
>
> Thanks for the quick reply and the tip.
>
> Shouldn't gcc either give an error, or restore the old behaviour? Would a patch
> doing one of the two be accepted? If so, what behaviour is prefered?
Error out, like it did in 3.3.x and before, see the duplicated bug for
a little more details.
-- Pinski
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24241