Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* POSIX Threads and C++ with Tru64 CXX
@ 1999-07-28  4:00 Didier Donner
  1999-07-28  4:00 ` Ken Block USG
  0 siblings, 1 reply; 2+ messages in thread
From: Didier Donner @ 1999-07-28  4:00 UTC (permalink / 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






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-07-28  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-28  4:00 POSIX Threads and C++ with Tru64 CXX Didier Donner
1999-07-28  4:00 ` Ken Block USG

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