Subj : Re: Linking without -lpthread doesn't fail?? To : comp.programming.threads From : David Schwartz Date : Wed Oct 05 2005 08:37 pm wrote in message news:1128535429.430571.137500@f14g2000cwb.googlegroups.com... > I'm using Linux and NPTL. I understand what you are saying but I don't > understand the purpose of such. I make a call to pthread_cond_timedwait > in a program. I forget to link with -lpthread. The function either does > nothing or in the case I put it in while loop waiting for ETIMEDOUT > waits forever. while (nothing != ETIMEDOUT); ??? > I or others sit around scratching their head wondering why it's not > working. It linked ok so all must be ok. They might as well do that for > every function in every library so we no longer have to see the linker > complain about unresolved references at all. If they are going to do > that why would they do it for functions that have no real replacement > function for? > Make no sense to me. > pthread_cond_timedwait reports success BTW. I can't understand how your code could possibly get in this situation. What are you waiting for? You are the only thread running, so why would you ever call pthread_cond_*wait? DS .