From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,86d1ed9866e618e9 X-Google-Attributes: gid1164f8,public From: Ken Block USG Subject: Re: POSIX Threads and C++ with Tru64 CXX Date: 1999/07/28 Message-ID: <379F93E3.55CE634C@zk3.dec.com>#1/1 X-Deja-AN: 506381756 References: <7nn8d7$58p$1@arcturus.ciril.fr> To: Didier Donner Content-Type: multipart/mixed; boundary="------------72D16193B600BEC35290BB2D" Organization: UBPG Mime-Version: 1.0 Newsgroups: comp.sys.dec This is a multi-part message in MIME format. --------------72D16193B600BEC35290BB2D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 void *func(void *) { return 0; } pthread_t thread_; void main() { int status = pthread_create( &thread_, NULL, func, (void*)1 ); } --------------72D16193B600BEC35290BB2D Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Kenneth Block Content-Disposition: attachment; filename="vcard.vcf" 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 --------------72D16193B600BEC35290BB2D--