Undefined reference to 'select()'

walt wa1ter at myrealbox.com
Sat Jun 17 00:25:23 PDT 2006


On Fri, 16 Jun 2006, David Cuthbert wrote:

> walt wrote:
> > Something recently broke several ports with this same link error:
> >
> > foo.o(.text+0x965): In function `foo::select()':
> > : undefined reference to `select(int, fd_set*, fd_set*, fd_set*, timeval*)'

> Note that it's giving you the types of parameters -- this is a C++ feature
> (typesafe linkage), but select() is a C function.
>
> A header has probably lost it's extern "C" { } guard.


Here is the actual code from fam, and there is no extern "C"
appearing anywhere in the file:

 int status = ::select(nfds, &readfds, &writefds, 0, timeout);

Could you explain briefly the meaning of the :: for me?  I've been
reading a c++ tutorial but I haven't come to that lesson yet :o)

Thanks!






More information about the Bugs mailing list