From: Ken Block USG <block@zk3.dec.com>
To: Didier Donner <Didier.Donner@ensg.u-nancy.fr>
Subject: Re: POSIX Threads and C++ with Tru64 CXX
Date: 1999/07/28 [thread overview]
Message-ID: <379F93E3.55CE634C@zk3.dec.com> (raw)
In-Reply-To: 7nn8d7$58p$1@arcturus.ciril.fr
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
I don't believe you want to compile -threads, I think you want -pthread. The
following is from "man cxx":
-pthread Direct the linker to use the threadsafe version of any
library specified with the -l flag when linking programs.
This flag also tells the linker to include the POSIX
1003.1c-conformant DECthreads interfaces in libpthread when
linking the program.
-threads Direct the linker to use the thread-safe version of any
library specified with the -l flag when linking programs.
This flag also tells the linker to include both the DEC-
thread interfaces that are conformant with POSIX 1003.4a
Draft 4. The flag is supported only for compatability with
earlier releases of the operating system. New designs should
use the -pthread flag.
It is easy to reproduce what you are seeing:
cxxosf.zko.dec.com> cxx -c t.cxx -threads
cxx: Error: t.cxx, line 9: no suitable constructor exists to convert from
"long" to "CMA_T_HANDLE"
&thread_, NULL,
------------------^
cxx: Info: 1 error detected in the compilation of "t.cxx".
cxxosf.zko.dec.com> cxx -c t.cxx -pthread
cxxosf.zko.dec.com> cat t.cxx
#include <pthread.h>
void *func(void *) { return 0; }
pthread_t thread_;
void main()
{
int status = pthread_create(
&thread_, NULL,
func, (void*)1
);
}
[-- Attachment #2: Card for Kenneth Block --]
[-- Type: text/x-vcard, Size: 336 bytes --]
begin: vcard
fn: Kenneth Block
n: Block;Kenneth
org: CTG C/C++ Compiler
adr: 110 Spit Brook Road;;M/S ZKO3-2/W02;Nashua;NH;03062;USA
email;internet: block@zk3.dec.com
tel;work: 603-884-2819
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
prev parent 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 POSIX Threads and C++ with Tru64 CXX Didier Donner
1999-07-28 4:00 ` Ken Block USG [this message]
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