Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: -lpthread

From: Todd T. Fries <todd(at)openbsd.org>
Date: Mon Mar 17 2003 - 07:39:17 EST

Once in a while someone asks this question. Once in a while we must remind them:

        gcc [..] -o someprogram [..] -pthread [..]

Is doing this under the hood:

        gcc [..] -o someprogram [..] -lpthread [..]

However, at some future point it may do more, or it may do things differently.

There are misc reasons to use '-pthread' over '-lpthread' on OpenBSD, the bottom line is that there should never be any reason to ever use '-lpthread' other than 'a port has not yet been fixed to do so'. There are possibilities in the future that '-pthread' may do more than just '-lpthread'. It allows us to tweak things under the hood, via the specs file, that '-lpthread' does not.

As to your specific issue, please show the actual gcc link command line. I am surprised to hear what you report, it makes no sense, '-pthread' is equivalent to '-lpthread' at this time ('-pthread' should be used for linking time, not compiling .c to .o).

Oh, what arch are you compiling on?

-- 
Todd Fries .. todd@openbsd.org
Free Daemon Consulting, LLC Land: 405-748-4596 http://FreeDaemonConsulting.fries.net Mobile: 405-203-6124 "..in support of free software solutions." Key fingerprint: 37E7 D3EB 74D0 8D66 A68D B866 0326 204E 3F42 004A Key: http://todd.fries.net/pgp.txt (last updated 2003/03/13 07:14:10) Penned by Flinn Mueller on Sat, Mar 15, 2003 at 03:37:32AM -0500, we have:
| I know there was a change to a new libpthread
Received on Mon Mar 17 12:22:40 2003
Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:43:42 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library