Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't use std::thread with CDT and MinGW
Can't use std::thread with CDT and MinGW [message #773927] Mon, 02 January 2012 17:25 Go to next message
Eclipse User
I am wanting to use std::thread with my Eclipse Indigo and MinGW (gcc 4.6.1)
combination on Windows 7 but it reports that thread is not a member of std.
I have included <thread> but when I examine that file it only defines thread
if __GXX_EXPERIMENTAL_CXX0X__ is defined.

How is this variable supposed to get defined? I already use the compiler
option of std=c++0x so what else do I need to do to have std::thread as a
usable class?

--
Regards,

Jarrick
Can't use std::thread with CDT and MinGW [message #775651 is a reply to message #773927] Fri, 06 January 2012 08:02 Go to previous messageGo to next message
Eclipse User
I am wanting to use std::thread with my Eclipse Indigo and MinGW (gcc 4.6.1)
combination on Windows 7 but it reports that thread is not a member of std.
I have included <thread> but when I examine that file it only defines thread
if __GXX_EXPERIMENTAL_CXX0X__ is defined.

How is this variable supposed to get defined? I already use the compiler
option of std=c++0x so what else do I need to do to have std::thread as a
usable class?

--
Regards,

Jarrick
Re: Can't use std::thread with CDT and MinGW [message #778371 is a reply to message #775651] Thu, 12 January 2012 11:03 Go to previous messageGo to next message
Harry Houdini is currently offline Harry Houdini
Messages: 131
Registered: February 2010
Senior Member
Set it in the project properties :

C/C++ General -> Paths and Symbols
Symbols tab
Languages : GNU C++
Add...
Name -> __GXX_EXPERIMENTAL_CXX0X__
Value -> (nothing)
Re: Can't use std::thread with CDT and MinGW [message #778520 is a reply to message #778371] Thu, 12 January 2012 21:42 Go to previous message
Rob Lorimer is currently offline Rob Lorimer
Messages: 3
Registered: January 2012
Junior Member
In my case, I have added "-std=c++0x" to Project -> Properties -> C++-Build[Settings] -> G++Compiler[miscellanous] -> Other flags.

By adding -std=gnu++0x to discovery options, a few new symbols are added to my project paths and symbols (after a build and index update) e.g. GXX_EXPERIMENTAL_CXX0X.
Previous Topic:Unresolved inclusion iostream, later cout could not be resolved
Next Topic:c++0x compiles but editor errors (-gnu++0x discovery)
Goto Forum:
  


Current Time: Fri Jul 25 16:00:42 EDT 2014

Powered by FUDForum. Page generated in 0.02250 seconds