Undefined reference to 'select()'
wa1ter at myrealbox.com
Sat Jun 17 14:03:16 PDT 2006
Simon 'corecode' Schubert wrote:
> On 17.06.2006, at 09:25, walt wrote:
>> Here is the actual code from fam, and there is no extern "C"
>> appearing anywhere in the file:
> yes, it should be around the declaration
>> int status = ::select(nfds, &readfds, &writefds, 0, timeout);
Fam has one other example of the use of extern "C", but it
encloses the declaration (or is it definition?) of a prototype.
In the example above there is no prototype for 'select', so I'm
not sure where the 'extern' should go.
Just for fun I added this prototype to the code:
extern "C" int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
Now I get complaints from <sys/select.h> about duplicate definitions
of select() :o(
I've tried surrounding my new prototype with various #ifndefs, but
no joy so far.
I'm wondering if the recent changes to select.h have resulted in
a circular dependency somewhere. Dunno.
More information about the Bugs