HELP! FreeBSD g++ multi-threaded application?

jeanniey@corp124.com jeanniey@corp124.com
Tue Jan 23 13:46:00 GMT 2001


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.


More information about the Libstdc++ mailing list