RE: [Boost-users] Re: why so many .so and .a files for boost?
Yes, to enable multi-threaded code. But how?
What's going on inside while compiling with '-pthread'?
Or what's the difference between them at the compilation level? Or Is there anything happen at optimization level?
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org]
Sent: Thursday, April 21, 2005 03:59
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Re: why so many .so and .a files for boost?
On 4/20/05, Tom Tan (SH/RDC)
got it, then why do i have to turn on the '-pthread' option of g++ when using boost_thread library?
Because you need that option to enable multi-threaded code. The Boost Threads library isn't much use without it :-) -- Caleb Epstein caleb dot epstein at gmail dot com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 4/20/05, Tom Tan (SH/RDC)
Yes, to enable multi-threaded code. But how? What's going on inside while compiling with '-pthread'? Or what's the difference between them at the compilation level? Or Is there anything happen at optimization level?
Preprocessor macros are defined (e.g. _REENTRANT), and reentrant/thread-safe APIs are exposed that might not be otherwise. And you'll automatically link with the -lpthreads library. I don't believe anything will change w/r/t code optimizations, etc, just build/runtime support. -- Caleb Epstein caleb dot epstein at gmail dot com
participants (2)
-
Caleb Epstein
-
Tom Tan (SH/RDC)