>From: Carl Kleffner <cmkleffner@...>
>Subject: [Mingw-users] RE: compiling with thread support
>Date: Thu, 3 Apr 2003 15:00:49 +0200 (MEST)
>does it mean, I do need -mthreads only for exception handling?
>So, if I compile c++ with -fno-exceptions, do I need the -mthreads
Using -fno-exceptions will not do what you want if you use the standard
"operator new" to allocate memory, because the normal version can throw
exceptions. You'll either need to use "new (std::nothrow)" or override
"operator new". However, as Oscar said you should try using -mthreads anyway
and if the resulting executable doesn't depend on mingwm10.dll then there is
no point in removing the flag.
> >Subject: Re: compiling with thread support
> >From: "Luke Dunstan" <coder_infidel <at> hotmail.com>
> >Date: Thu, 03 Apr 2003 09:31:13 +0800
> >Newsgroups: gmane.comp.gnu.mingw.user
> >You don't have to choose a different C library because MinGW always uses
> >MSVC "Multithreaded DLL" library, but you do need to use the "-mthreads"
> >flag when compiling and linking to ensure that C++ exception handling is
> >thread-safe. Be aware that this also causes your executable to depend on
> >mingwm10.dll, which is in the MinGW bin directory.
MSN Instant Messenger now available on Australian mobile phones. Go to