difference between -pthread and -lpthread

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: cnav
Date: Monday, February 16, 2009 - 6:32 am

Hi,

I just applied following patch:
http://cnav.pl/clamav-configure.patch

to clamav sources. And after that libclamav seems to work with pthreads.
ldd /usr/local/lib/libclamav.so.5.4
/usr/local/lib/libclamav.so.5.4:
         Start    End      Type Open Ref GrpRef Name
         084ef000 28522000 dlib 1    0   0 
/usr/local/lib/libclamav.so.5.4
         0d4b9000 2d4bd000 rlib 0    1   0 
/usr/local/lib/libclamunrar_iface.so.5.4
         010a0000 210a5000 rlib 0    2   0 
/usr/local/lib/libclamunrar.so.5.4
         06d89000 26d8d000 rlib 0    1   0 
/usr/local/lib/libbz2.so.10.4
         091a8000 291af000 rlib 0    1   0      /usr/local/lib/libgmp.so.7.1
         0a04b000 2a12a000 rlib 0    1   0 
/usr/local/lib/libiconv.so.5.0
         02484000 2248d000 rlib 0    1   0      /usr/lib/libpthread.so.11.0
         05a7c000 25a84000 rlib 0    3   0      /usr/lib/libz.so.4.1

Manuals says to use -pthread.
http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads&sektion=3

My question are:
What is the difference between those two libs ?
And why with -lpthread it's working and without not?

Regards,
  Mariusz Makowski
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
difference between -pthread and -lpthread, cnav, (Mon Feb 16, 6:32 am)
Re: difference between -pthread and -lpthread, patrick keshishian, (Mon Feb 16, 10:06 am)
Re: difference between -pthread and -lpthread, Jacob Meuser, (Mon Feb 16, 2:58 pm)
Re: difference between -pthread and -lpthread, Jacob Meuser, (Tue Feb 17, 3:00 am)
Re: difference between -pthread and -lpthread, Antoine Jacoutot, (Tue Feb 17, 3:14 am)
Re: difference between -pthread and -lpthread, patrick keshishian, (Tue Feb 17, 11:20 am)