This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: HELP! FreeBSD g++ multi-threaded application?
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: HELP! FreeBSD g++ multi-threaded application?
- From: jeanniey at corp124 dot com
- Date: Tue, 23 Jan 2001 13:46:32 -0800
- CC: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- References: <Pine.SOL.3.91.1010123133001.10237A-100000@cse.cygnus.com>
Benjamin Kosnik wrote:
>
> > I know that libstdc++ is not thread safe. Is
> > there any way to get around that? I am compiling
> > with the -D_REENTRANT -D_THREAD_SAFE -D_PTHREADS
> > -D__USE_MALLOC flags. Is there something else I'm
> > missing?
>
> Just use
> --enable-threads=posix
>
> and then -pthread on the compile line. You might want to provide more
> info on what compiler and library versions you are using.
>
> -benjamin
I'm using
gcc version 2.95.2 19991024 (release)
this came with the FreeBSD 4.2 install packages. I'm assuming that the
libstdc++ library is also the same version?
the --enable-threads=posix is a build option for the compiler right? I
don't know what options the compiler was built with... since it came off
the FreeBSD install. Is there any way I can tell?
I am using the -pthreads linkage on the compile line.
Thanks for any help,
jeannie
p.s. I apologize if this is the wrong mailing list to be posing these
questions. I am also asking the freeBSD newsgroups. thank you again.