Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pthread Library location

Tags:

pthreads

In which directory does the libpthread library reside on a Linux system ?

like image 803
Dew Avatar asked Mar 01 '11 10:03

Dew


People also ask

Where is pthread located?

The pthreads run time library usually lives in /lib, while the development library usually lives in /usr/lib.

What is the pthread library?

The Pthreads Library Module (f_pthread) is a Fortran 90 module that defines data types and routines to make it easier to interface with the AIX® pthreads library. The AIX pthreads library is used to parallelize and to make your code thread-safe.

How do I add pthread library to Visual Studio?

Go to Common Properties>Linker>Input. In Additional Dependencies add pthreadVC2. lib as a dependency.

Is pthread a standard library?

POSIX thread (pthread) libraries. The POSIX thread libraries are a standards based thread API for C/C++. It allows one to spawn a new concurrent process flow.


2 Answers

There are a number of ways to find this out.

Simply type find / -name 'libpthread.so' -print to find the file named libpthread.so on your system.

You can check the library locations your dynamic linker ld checks in for libraries, which are listed in /etc/ld.so.conf.

Also, if you are running a debian-based distro, or have dpkg installed, you can use dpkg -S libpthread, which will give you the packages that contain files with the name libpthread and where those files are installed. Distros with RPM support should have a similar feature. Hope this helps!

like image 152
Sean Kelleher Avatar answered Oct 31 '22 15:10

Sean Kelleher


You can try the following command = locate libpthread.so

it gave the following output when I tried :

/lib/i386-linux-gnu/libpthread.so.0
/usr/lib/i386-linux-gnu/libpthread.so
like image 7
spd Avatar answered Oct 31 '22 15:10

spd