Sathya3110 wrote: > The libpthread_nonshared.a was located in /usr/lib. Sorry, i could not > exactly understand what you mean by that. > > > Thomas Hruska wrote: >> Sathya3110 wrote: >>> A multithreaded c program should be linked with libpthread.so. I found >>> that >>> in /usr/lib there are two pthread libs 1. libpthread.so, and 2. >>> libpthread.a. But i found that there is also something called >>> libpthread_nonshared.a. What is this used for? Please clarify. >> libpthread_nonshared.a is probably is the static version of the library >> (i.e. code is linked into the final executable) while libpthread.a >> probably makes your code dependent on libpthread.so (shared library) >> being on the system.
My knowledge of the Linux build system is somewhat limited when it comes to libraries and conflicts (most of it is usually 'automagically' worked out). I'm primarily a Windows developer and occasionally port stuff to Linux - that is, I know enough to break things but not necessarily fix them. AFAIK, .a is the rough equivalent of .lib and .so is the rough equivalent of .dll. In .lib files, they can either contain static code or links to external (.dll) files. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
