User forums > Using Code::Blocks

why no std::thread?

(1/2) > >>

demone:
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.

killerbot:
the TDM mingW port indeed does not support std::thread, short : LGPL issues and so on.

demone:
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?

Jenna:

--- Quote from: demone on April 21, 2013, 10:10:51 pm ---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?

--- End quote ---

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.

Alpha:

--- Quote from: jens on April 21, 2013, 10:15:39 pm ---We do not build vompilers just an IDE, that works with many compilers.

--- End quote ---
That sounds scary... if I install one, will it suck the blood from my computer? ;)

Navigation

[0] Message Index

[#] Next page

Go to full version