On 9/20/2011 05:05, Venu Gopal wrote:
> 
> 
>>>>> If you're willing to use mingw-w64, I believe that std::thread *is* 
>>>>> supported  on windows.
>>> There are *experimental* GCC 4.7 and 4.6 builds available, but for now only 
>>> linking with "-static" works.
> 
>>> GCC 4.6: 
>>> http://code.google.com/p/pcxprj/downloads/detail?name=MinGW_gcc4.6.2.20110826_static_enable_std_thread_test.7z&can=2&q=
>>> GCC 4.7: 
>>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/
>>>  and 
>>> http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/
> 
> 
> I wouldn't mind using mingw-w64, but do have the need to build 32-bit 
> binaries.
> 
> 
>>> It's not fully functional yet (libstdc++ dll throws an uncaught exception, 
>>> link with -static to work around this), so I'd hardly say it's official 
>>> support...
>>> Work is being done on getting it working completely  and correctly :-)
> 
> This is great for mingw-w64, but the original question still remains 
> unanswered as far as I can tell (please correct me if I am wrong) i.e.   How 
> do we get std::thread support into mingw (not mingw-w64 where it is clearly 
> well under way) ?
> Guess what I am saying is that I would like to code using std::thread with 
> minGW.  (Is there anyone from minGW organization on this thread?)
> 
> Venu P. Gopal

std::thread support relies on winpthreads, not pthreads-win32. The
former is still under development to get around pthreads-win32 shortcomings.

I think it has some mingw-w64 specific bits in it, so I'm not sure if
it'll work on mingw.org at the moment, its untested. The winpthreads
library may move into the crt one day.

Once you have winpthread, rebuild gcc with --enable-threads=posix and
modify the specs file to link with pthread by default. Otherwise, libgcc
won't build.

BTW, please register at with the mingw-w64-public mailing list so your
messages won't be held by the spam filter.

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to