Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: "Didier Donner" <Didier.Donner@ensg.u-nancy.fr>
Subject: POSIX Threads and C++ with Tru64 CXX
Date: 1999/07/28	[thread overview]
Message-ID: <7nn8d7$58p$1@arcturus.ciril.fr> (raw)

Hello,

I am trying to compile C++ code with the POSIX 1003.1c
threads library. The C++ compiler is CXX 6.1-029 on a 4.0e Alpha.

The code is basically a set of C++ class which hides the variation in
implementation on variuous Unixes.
When I tried to compile this code
    int status = pthread_create(
        &thread_, NULL,
        &OSThreadImpl::thread_execute, (void*)this
    );

I get the following error
cxx: Error: threads.cc, line 679: no suitable constructor exists to convert
          from "long" to "CMA_T_HANDLE"
        &thread_, NULL,
------------------^

When I read the documentation for pthread_create, I got this
  int pthread_create(
              pthread_t             *thread,
              const pthread_attr_t  *attr,
              void *        (*start_routine)(void *),
              void          *arg);

According to the man pages, the attr parameter can be NULL.

Here are the compilations options.
cxx -c -o ../../../decunix4.0-cxx.shared.debug/threads.o  -ptr
../../../lib/decunix4.0-cxx.shared.debug/cxx_repository.utils
-threads   -g  -Ddec_unix -D__ANSI_CPP__ -DUSE_PTHREAD     -I/usr/include/cx
x  -I../../../include  threads.cc

Any help would be appreciated.

Thank you in advance,

Didier Donner






             reply	other threads:[~1999-07-28  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-28  4:00 Didier Donner [this message]
1999-07-28  4:00 ` POSIX Threads and C++ with Tru64 CXX Ken Block USG
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox