[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
??,?: Yet a question about g++/STL/multithreading
From: |
PeterPan |
Subject: |
??,?: Yet a question about g++/STL/multithreading |
Date: |
Thu, 26 Apr 2001 14:46:15 +0800 |
Alexandre Oliva:
thank you very much!!
--enable-threads and -pthreads not recognized, but -D_PTHREADS worked.
it seems that the document never mentioned it.
I found some .mt files in libstdc++/config that defined these macroes,
is there any flags of gcc/g++ to use them directly?(-pthreads not works)
yours, Xuesong Guo
peterpan@mailsrv0 ~$ g++ -v
Reading specs from
/export/home/peterpan/lib/gcc-lib/i386-pc-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
peterpan@mailsrv0 ~$ g++ -D_REENTRANT -lpthread -Wall --enable-threads
-D_PTHREADS -pthreads t.cc
g++: unrecognized option `-pthreads'
cc1plus: Invalid option `-fenable-threads'
-----????-----
???: help-gplusplus-admin@gnu.org [mailto:help-gplusplus-admin@gnu.org]??
Alexandre Oliva
????: 2001?4?26? 2:49
???: PeterPan
??: help-gplusplus@gnu.org; gcc-bugs@gcc.gnu.org
??: Re: Yet a question about g++/STL/multithreading
On Apr 25, 2001, "PeterPan" <peterpan@chinaren-inc.com> wrote:
> I've been using g++ to compile a multithreading program on
> Solaris x86, and my program crashed when I run it.
You don't mention having built GCC with --enable-threads anywhere.
Did you forget to do that?
You may need to #define _PTHREADS too, so that MT-safe allocators are
used, since I see you're not using the -pthreads flag, that implicitly
defines it.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gplusplus