Subj : Re: Where to download a pthread library To : comp.programming.threads From : Drazen Kacar Date : Wed Mar 30 2005 02:04 pm David Butenhof wrote: > David Schwartz wrote: > > Many platforms require more than just linking in an additional > > library, they need compiler flags (like -D_REENTRANT) as well. The > > standard is '-pthread' to do > -pthread is arguably a reasonably widespread CONVENTION, but definitely > not worthy of the term "standard" either in a de jure or de facto sense. > It'll work for many versions of gcc across platforms, (but not all), and > several vendor compilers. The second most popular is probably "-mt" > (e.g., on Solaris). AFAIK, -mt is just a shortcut for -D_REENTRANT and -lthread with Sun's compiler. You still need to add -lpthread if you want to use POSIX threads. Maybe it would work with -mt only, but that's an implementation artifact, I think. -- .-. .-. Yes, I am an agent of Satan, but my duties are largely (_ \ / _) ceremonial. | | dave@fly.srk.fer.hr .