Subj : Re: Linking without -lpthread doesn't fail?? To : comp.programming.threads From : Casper H.S. Dik Date : Thu Oct 06 2005 09:35 am "David Schwartz" writes: > The short answer is that if you break the rules, then things will break. >The longer answer is that some operating systems provide stubs for the >pthread_* functions in a (misguided?) effort to allow you to write code that >works with or without the threading library. The main motivator for Solaris was, I believe, the ability to have the system libraries work in both threaded and non-threaded environments; the developer forgetting "-mt" or -lthread/-lpthread was more like collateral damage than anything else. (It did allow the same developer to write libraries which could be used in single and multithreaded apps alike) But it wasn't a perfect solution and the way Solaris 10 behaves is much nicer. Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth. .