Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: demone on April 21, 2013, 09:45:13 pm
-
I guess why code::blocks used a GCC package with no thread support under windows.
If I try to compile the following:
#include <iostream>
#include <thread>
void foo(){
std::cout<<"hello thread"<<std::endl;
}
int main(){
std::thread myT(foo);
myT.join();
return 0;
}
I get the error "thread is not a member of std"
I already have the flag
"-std=C++11"
in compile options.
-
the TDM mingW port indeed does not support std::thread, short : LGPL issues and so on.
-
oh my bad :( that's really freaking. Ok I have than to swap to Linux partition.
is there any chance to add support for std::thread ever in GCC at this point?
-
oh my bad :( that's really freaking. Ok I have than to swap to Linux partition.
is there any chance to add support for std::thread ever in GCC at this point?
That's not the right place to ask.
We do not build vompilers just an IDE, that works with many compilers.
We ship with a TDM's gcc on windows to make it easy to start coding for beginners (and most other users) without the need to explicitely download a compiler.
So you as user are free to use any supported compiler, with or without std:thread-support.
-
We do not build vompilers just an IDE, that works with many compilers.
That sounds scary... if I install one, will it suck the blood from my computer? ;)
-
That sounds scary... if I install one, will it suck the blood from my computer? ;)
You've never heard of garlic AV suite? The first AV solution at all?
- osdt
-
For those that want std::thread, the MinGW-builds implementation of GCC at provides pretty good support, and works just fine with C::B - I've got a short blog article about it at http://latedev.wordpress.com/2013/02/24/investigating-c11-threads/ .
-
IN particular you may be interested in one of those 2 pakcages from mingw-builds
GCC 4.8.0 32-bit => stack unwinding sjlj & thread support from POSIX
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/32-bit/threads-posix/sjlj/x32-4.8.0-release-posix-sjlj-rev2.7z/download
GCC 4.7.1 32-bit => stack unwinding sjlj & thread support from POSIX
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.1/32-bit/threads-posix/sjlj/x32-4.7.1-release-posix-sjlj-rev0.7z/download
there are other packages as well ^^
they works fine with C::B.
-
My origin patch was modified by Kai and has been committed to gcc.
http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg03269.html
But you must use posix thread and winpthread to enable the feature.