This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Yet a question about g++/STL/multithreading
- To: "PeterPan" <peterpan at chinaren-inc dot com>
- Subject: Re: Yet a question about g++/STL/multithreading
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 25 Apr 2001 15:49:04 -0300
- Cc: <help-gplusplus at gnu dot org>, <gcc-bugs at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <FKEMIGHMDFGBECEMMEIMEEFHCBAA.peterpan@chinaren-inc.com>
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