Skip to main content


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 22:25 Go to next message
Eclipse UserFriend
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 13:02 Go to previous messageGo to next message
Eclipse UserFriend
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 16:03 Go to previous messageGo to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
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] Fri, 13 January 2012 02:42 Go to previous message
Rob Lorimer is currently offline Rob LorimerFriend
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: Tue Mar 19 09:14:30 GMT 2024

Powered by FUDForum. Page generated in 0.02057 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top