Summary: | undefined reference to main when linking an object file generated from multiple .c files | ||
---|---|---|---|
Product: | gcc | Reporter: | Indan <indan> |
Component: | c | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gcc-bugs, indan |
Priority: | P2 | ||
Version: | 4.0.2 | ||
Target Milestone: | 4.0.3 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Indan
2005-10-06 16:45:12 UTC
*** This bug has been marked as a duplicate of 22544 *** Note if you want the compiling multiple .c into one .o files use -combine. (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? 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
|