On Thu, Mar 29, 2001, Lars G. wrote:

> I'm trying to merge two programms, one uses the linux pthreads and the other
> one uses Gnu Pth. 

What do you mean with "merging"? Merging on the source level?  If yes and the
used API is Pthreads, you never should need both Pth and LinuxThreads, because
both provide Pthreads API. Then just use either Pth or LinuxThreads, but never
both.

> I linked both libs, but get errors during runtime.

That's clear, linking in both libs cannot work. They are mutually exclusive,
because both provide the same API, but implement it differently. So
even if it would link successfully it certainly will not run.

> So I used the pthread povided with Pth instead. The following symbols
> were undefined:
> pthread_detach
> _pthread_cleanup_push
> _pthread_cleanup_pop

This indicates that you have _NOT_ included Pth's pthread.h.  Seems like you
instead included the vendor pthread.h. Make sure you use
-I/path/to/pth/include/dir in your compile commands.

> Is the pthread from pth compatible with pthread from glibc ? 

On the source level: yes. Except for a few non-standard and/or obsolete
Pthread API things present in LinuxThreads.  On the object linking level: no.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to