This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined reference to `__errno_location(void)'


On Wed, 4 Sep 2002 12:20:11 -0400 (EDT)
Rupert Wood <rup@kanat.pair.com> wrote:

> Claudio Bley wrote:
> 
> >     GRE> extern int errno;
> >          ^^^^^^^^^^^^^^^^^
> >
> > Remove this line from your source. You get the error because errno is
> > defined as a macro and the line is expanded to
> >
> > extern int (*__errno_location ());
> 
> Which, in that scope, is defined as a C++ symbol. Which is why it
> didn't match the C __errno_location in libpthread.
> 
> The "d'oh" here is that the clue was in the title: it wouldn't have said
> "(void)" if it was trying to match a C symbol because it wouldn't have
> that information.
> 
> Oh well, we learn. (And good spot, Claudio!)
> 
> Rup.
> 
> 

I just wanted to thank you all for your help. The problem seems resolved.
I also want to thank the others that helped me that I didn't reply to in
this message, Such as Der Herr Hofrat.

Sincerely,

Gordon R. Ellsworth, Jr.

P.S. Now I feel stupid. "d'oh!"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]